appwrite-cli 18.0.1 → 18.1.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.
package/dist/cli.cjs CHANGED
@@ -917,8 +917,8 @@ var require_command = __commonJS({
917
917
  "node_modules/commander/lib/command.js"(exports2) {
918
918
  var EventEmitter2 = require("events").EventEmitter;
919
919
  var childProcess4 = require("child_process");
920
- var path16 = require("path");
921
- var fs20 = require("fs");
920
+ var path17 = require("path");
921
+ var fs21 = require("fs");
922
922
  var process4 = require("process");
923
923
  var { Argument: Argument2, humanReadableArgName } = require_argument();
924
924
  var { CommanderError: CommanderError2 } = require_error();
@@ -1745,10 +1745,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1745
1745
  let launchWithNode = false;
1746
1746
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1747
1747
  function findFile(baseDir, baseName) {
1748
- const localBin = path16.resolve(baseDir, baseName);
1749
- if (fs20.existsSync(localBin)) return localBin;
1750
- if (sourceExt.includes(path16.extname(baseName))) return void 0;
1751
- const foundExt = sourceExt.find((ext) => fs20.existsSync(`${localBin}${ext}`));
1748
+ const localBin = path17.resolve(baseDir, baseName);
1749
+ if (fs21.existsSync(localBin)) return localBin;
1750
+ if (sourceExt.includes(path17.extname(baseName))) return void 0;
1751
+ const foundExt = sourceExt.find((ext) => fs21.existsSync(`${localBin}${ext}`));
1752
1752
  if (foundExt) return `${localBin}${foundExt}`;
1753
1753
  return void 0;
1754
1754
  }
@@ -1759,23 +1759,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
1759
1759
  if (this._scriptPath) {
1760
1760
  let resolvedScriptPath;
1761
1761
  try {
1762
- resolvedScriptPath = fs20.realpathSync(this._scriptPath);
1762
+ resolvedScriptPath = fs21.realpathSync(this._scriptPath);
1763
1763
  } catch (err) {
1764
1764
  resolvedScriptPath = this._scriptPath;
1765
1765
  }
1766
- executableDir = path16.resolve(path16.dirname(resolvedScriptPath), executableDir);
1766
+ executableDir = path17.resolve(path17.dirname(resolvedScriptPath), executableDir);
1767
1767
  }
1768
1768
  if (executableDir) {
1769
1769
  let localFile = findFile(executableDir, executableFile);
1770
1770
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1771
- const legacyName = path16.basename(this._scriptPath, path16.extname(this._scriptPath));
1771
+ const legacyName = path17.basename(this._scriptPath, path17.extname(this._scriptPath));
1772
1772
  if (legacyName !== this._name) {
1773
1773
  localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
1774
1774
  }
1775
1775
  }
1776
1776
  executableFile = localFile || executableFile;
1777
1777
  }
1778
- launchWithNode = sourceExt.includes(path16.extname(executableFile));
1778
+ launchWithNode = sourceExt.includes(path17.extname(executableFile));
1779
1779
  let proc;
1780
1780
  if (process4.platform !== "win32") {
1781
1781
  if (launchWithNode) {
@@ -2354,7 +2354,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2354
2354
  }
2355
2355
  return positiveOption || option2;
2356
2356
  };
2357
- const getErrorMessage2 = (option2) => {
2357
+ const getErrorMessage3 = (option2) => {
2358
2358
  const bestOption = findBestOptionFromValue(option2);
2359
2359
  const optionKey = bestOption.attributeName();
2360
2360
  const source = this.getOptionValueSource(optionKey);
@@ -2363,7 +2363,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2363
2363
  }
2364
2364
  return `option '${bestOption.flags}'`;
2365
2365
  };
2366
- const message = `error: ${getErrorMessage2(option)} cannot be used with ${getErrorMessage2(conflictingOption)}`;
2366
+ const message = `error: ${getErrorMessage3(option)} cannot be used with ${getErrorMessage3(conflictingOption)}`;
2367
2367
  this.error(message, { code: "commander.conflictingOption" });
2368
2368
  }
2369
2369
  /**
@@ -2551,7 +2551,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2551
2551
  * @return {Command}
2552
2552
  */
2553
2553
  nameFromFilename(filename) {
2554
- this._name = path16.basename(filename, path16.extname(filename));
2554
+ this._name = path17.basename(filename, path17.extname(filename));
2555
2555
  return this;
2556
2556
  }
2557
2557
  /**
@@ -2565,9 +2565,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2565
2565
  * @param {string} [path]
2566
2566
  * @return {string|Command}
2567
2567
  */
2568
- executableDir(path17) {
2569
- if (path17 === void 0) return this._executableDir;
2570
- this._executableDir = path17;
2568
+ executableDir(path18) {
2569
+ if (path18 === void 0) return this._executableDir;
2570
+ this._executableDir = path18;
2571
2571
  return this;
2572
2572
  }
2573
2573
  /**
@@ -3632,15 +3632,15 @@ var require_route = __commonJS({
3632
3632
  };
3633
3633
  }
3634
3634
  function wrapConversion(toModel, graph) {
3635
- const path16 = [graph[toModel].parent, toModel];
3635
+ const path17 = [graph[toModel].parent, toModel];
3636
3636
  let fn2 = conversions[graph[toModel].parent][toModel];
3637
3637
  let cur = graph[toModel].parent;
3638
3638
  while (graph[cur].parent) {
3639
- path16.unshift(graph[cur].parent);
3639
+ path17.unshift(graph[cur].parent);
3640
3640
  fn2 = link(conversions[graph[cur].parent][cur], fn2);
3641
3641
  cur = graph[cur].parent;
3642
3642
  }
3643
- fn2.conversion = path16;
3643
+ fn2.conversion = path17;
3644
3644
  return fn2;
3645
3645
  }
3646
3646
  module2.exports = function(fromModel) {
@@ -3880,7 +3880,7 @@ var require_has_flag = __commonJS({
3880
3880
  var require_supports_color = __commonJS({
3881
3881
  "node_modules/supports-color/index.js"(exports2, module2) {
3882
3882
  "use strict";
3883
- var os8 = require("os");
3883
+ var os9 = require("os");
3884
3884
  var tty = require("tty");
3885
3885
  var hasFlag = require_has_flag();
3886
3886
  var { env } = process;
@@ -3928,7 +3928,7 @@ var require_supports_color = __commonJS({
3928
3928
  return min;
3929
3929
  }
3930
3930
  if (process.platform === "win32") {
3931
- const osRelease = os8.release().split(".");
3931
+ const osRelease = os9.release().split(".");
3932
3932
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3933
3933
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3934
3934
  }
@@ -5826,11 +5826,11 @@ var require_baseGet = __commonJS({
5826
5826
  "node_modules/lodash/_baseGet.js"(exports2, module2) {
5827
5827
  var castPath = require_castPath();
5828
5828
  var toKey = require_toKey();
5829
- function baseGet(object2, path16) {
5830
- path16 = castPath(path16, object2);
5831
- var index = 0, length = path16.length;
5829
+ function baseGet(object2, path17) {
5830
+ path17 = castPath(path17, object2);
5831
+ var index = 0, length = path17.length;
5832
5832
  while (object2 != null && index < length) {
5833
- object2 = object2[toKey(path16[index++])];
5833
+ object2 = object2[toKey(path17[index++])];
5834
5834
  }
5835
5835
  return index && index == length ? object2 : void 0;
5836
5836
  }
@@ -5842,8 +5842,8 @@ var require_baseGet = __commonJS({
5842
5842
  var require_get = __commonJS({
5843
5843
  "node_modules/lodash/get.js"(exports2, module2) {
5844
5844
  var baseGet = require_baseGet();
5845
- function get(object2, path16, defaultValue) {
5846
- var result = object2 == null ? void 0 : baseGet(object2, path16);
5845
+ function get(object2, path17, defaultValue) {
5846
+ var result = object2 == null ? void 0 : baseGet(object2, path17);
5847
5847
  return result === void 0 ? defaultValue : result;
5848
5848
  }
5849
5849
  module2.exports = get;
@@ -5925,14 +5925,14 @@ var require_baseSet = __commonJS({
5925
5925
  var isIndex = require_isIndex();
5926
5926
  var isObject2 = require_isObject();
5927
5927
  var toKey = require_toKey();
5928
- function baseSet(object2, path16, value, customizer) {
5928
+ function baseSet(object2, path17, value, customizer) {
5929
5929
  if (!isObject2(object2)) {
5930
5930
  return object2;
5931
5931
  }
5932
- path16 = castPath(path16, object2);
5933
- var index = -1, length = path16.length, lastIndex = length - 1, nested = object2;
5932
+ path17 = castPath(path17, object2);
5933
+ var index = -1, length = path17.length, lastIndex = length - 1, nested = object2;
5934
5934
  while (nested != null && ++index < length) {
5935
- var key = toKey(path16[index]), newValue = value;
5935
+ var key = toKey(path17[index]), newValue = value;
5936
5936
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
5937
5937
  return object2;
5938
5938
  }
@@ -5940,7 +5940,7 @@ var require_baseSet = __commonJS({
5940
5940
  var objValue = nested[key];
5941
5941
  newValue = customizer ? customizer(objValue, key, nested) : void 0;
5942
5942
  if (newValue === void 0) {
5943
- newValue = isObject2(objValue) ? objValue : isIndex(path16[index + 1]) ? [] : {};
5943
+ newValue = isObject2(objValue) ? objValue : isIndex(path17[index + 1]) ? [] : {};
5944
5944
  }
5945
5945
  }
5946
5946
  assignValue(nested, key, newValue);
@@ -5956,8 +5956,8 @@ var require_baseSet = __commonJS({
5956
5956
  var require_set = __commonJS({
5957
5957
  "node_modules/lodash/set.js"(exports2, module2) {
5958
5958
  var baseSet = require_baseSet();
5959
- function set2(object2, path16, value) {
5960
- return object2 == null ? object2 : baseSet(object2, path16, value);
5959
+ function set2(object2, path17, value) {
5960
+ return object2 == null ? object2 : baseSet(object2, path17, value);
5961
5961
  }
5962
5962
  module2.exports = set2;
5963
5963
  }
@@ -18262,11 +18262,11 @@ var require_hasPath = __commonJS({
18262
18262
  var isIndex = require_isIndex();
18263
18263
  var isLength = require_isLength();
18264
18264
  var toKey = require_toKey();
18265
- function hasPath(object2, path16, hasFunc) {
18266
- path16 = castPath(path16, object2);
18267
- var index = -1, length = path16.length, result = false;
18265
+ function hasPath(object2, path17, hasFunc) {
18266
+ path17 = castPath(path17, object2);
18267
+ var index = -1, length = path17.length, result = false;
18268
18268
  while (++index < length) {
18269
- var key = toKey(path16[index]);
18269
+ var key = toKey(path17[index]);
18270
18270
  if (!(result = object2 != null && hasFunc(object2, key))) {
18271
18271
  break;
18272
18272
  }
@@ -18287,8 +18287,8 @@ var require_hasIn = __commonJS({
18287
18287
  "node_modules/lodash/hasIn.js"(exports2, module2) {
18288
18288
  var baseHasIn = require_baseHasIn();
18289
18289
  var hasPath = require_hasPath();
18290
- function hasIn(object2, path16) {
18291
- return object2 != null && hasPath(object2, path16, baseHasIn);
18290
+ function hasIn(object2, path17) {
18291
+ return object2 != null && hasPath(object2, path17, baseHasIn);
18292
18292
  }
18293
18293
  module2.exports = hasIn;
18294
18294
  }
@@ -18306,13 +18306,13 @@ var require_baseMatchesProperty = __commonJS({
18306
18306
  var toKey = require_toKey();
18307
18307
  var COMPARE_PARTIAL_FLAG = 1;
18308
18308
  var COMPARE_UNORDERED_FLAG = 2;
18309
- function baseMatchesProperty(path16, srcValue) {
18310
- if (isKey(path16) && isStrictComparable(srcValue)) {
18311
- return matchesStrictComparable(toKey(path16), srcValue);
18309
+ function baseMatchesProperty(path17, srcValue) {
18310
+ if (isKey(path17) && isStrictComparable(srcValue)) {
18311
+ return matchesStrictComparable(toKey(path17), srcValue);
18312
18312
  }
18313
18313
  return function(object2) {
18314
- var objValue = get(object2, path16);
18315
- return objValue === void 0 && objValue === srcValue ? hasIn(object2, path16) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
18314
+ var objValue = get(object2, path17);
18315
+ return objValue === void 0 && objValue === srcValue ? hasIn(object2, path17) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
18316
18316
  };
18317
18317
  }
18318
18318
  module2.exports = baseMatchesProperty;
@@ -18335,9 +18335,9 @@ var require_baseProperty = __commonJS({
18335
18335
  var require_basePropertyDeep = __commonJS({
18336
18336
  "node_modules/lodash/_basePropertyDeep.js"(exports2, module2) {
18337
18337
  var baseGet = require_baseGet();
18338
- function basePropertyDeep(path16) {
18338
+ function basePropertyDeep(path17) {
18339
18339
  return function(object2) {
18340
- return baseGet(object2, path16);
18340
+ return baseGet(object2, path17);
18341
18341
  };
18342
18342
  }
18343
18343
  module2.exports = basePropertyDeep;
@@ -18351,8 +18351,8 @@ var require_property = __commonJS({
18351
18351
  var basePropertyDeep = require_basePropertyDeep();
18352
18352
  var isKey = require_isKey();
18353
18353
  var toKey = require_toKey();
18354
- function property(path16) {
18355
- return isKey(path16) ? baseProperty(toKey(path16)) : basePropertyDeep(path16);
18354
+ function property(path17) {
18355
+ return isKey(path17) ? baseProperty(toKey(path17)) : basePropertyDeep(path17);
18356
18356
  }
18357
18357
  module2.exports = property;
18358
18358
  }
@@ -31304,10 +31304,10 @@ var require_lib = __commonJS({
31304
31304
  exports2.analyse = analyse;
31305
31305
  var detectFile = (filepath, opts = {}) => new Promise((resolve3, reject) => {
31306
31306
  let fd;
31307
- const fs20 = (0, node_1.default)();
31307
+ const fs21 = (0, node_1.default)();
31308
31308
  const handler = (err, buffer) => {
31309
31309
  if (fd) {
31310
- fs20.closeSync(fd);
31310
+ fs21.closeSync(fd);
31311
31311
  }
31312
31312
  if (err) {
31313
31313
  reject(err);
@@ -31319,9 +31319,9 @@ var require_lib = __commonJS({
31319
31319
  };
31320
31320
  const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
31321
31321
  if (sampleSize > 0) {
31322
- fd = fs20.openSync(filepath, "r");
31322
+ fd = fs21.openSync(filepath, "r");
31323
31323
  let sample = Buffer.allocUnsafe(sampleSize);
31324
- fs20.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
31324
+ fs21.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
31325
31325
  if (err) {
31326
31326
  handler(err, null);
31327
31327
  } else {
@@ -31333,22 +31333,22 @@ var require_lib = __commonJS({
31333
31333
  });
31334
31334
  return;
31335
31335
  }
31336
- fs20.readFile(filepath, handler);
31336
+ fs21.readFile(filepath, handler);
31337
31337
  });
31338
31338
  exports2.detectFile = detectFile;
31339
31339
  var detectFileSync = (filepath, opts = {}) => {
31340
- const fs20 = (0, node_1.default)();
31340
+ const fs21 = (0, node_1.default)();
31341
31341
  if (opts && opts.sampleSize) {
31342
- const fd = fs20.openSync(filepath, "r");
31342
+ const fd = fs21.openSync(filepath, "r");
31343
31343
  let sample = Buffer.allocUnsafe(opts.sampleSize);
31344
- const bytesRead = fs20.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
31344
+ const bytesRead = fs21.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
31345
31345
  if (bytesRead < opts.sampleSize) {
31346
31346
  sample = sample.subarray(0, bytesRead);
31347
31347
  }
31348
- fs20.closeSync(fd);
31348
+ fs21.closeSync(fd);
31349
31349
  return (0, exports2.detect)(sample);
31350
31350
  }
31351
- return (0, exports2.detect)(fs20.readFileSync(filepath));
31351
+ return (0, exports2.detect)(fs21.readFileSync(filepath));
31352
31352
  };
31353
31353
  exports2.detectFileSync = detectFileSync;
31354
31354
  exports2.default = {
@@ -35996,7 +35996,7 @@ var require_has_flag2 = __commonJS({
35996
35996
  var require_supports_colors = __commonJS({
35997
35997
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
35998
35998
  "use strict";
35999
- var os8 = require("os");
35999
+ var os9 = require("os");
36000
36000
  var hasFlag = require_has_flag2();
36001
36001
  var env = process.env;
36002
36002
  var forceColor = void 0;
@@ -36034,7 +36034,7 @@ var require_supports_colors = __commonJS({
36034
36034
  }
36035
36035
  var min = forceColor ? 1 : 0;
36036
36036
  if (process.platform === "win32") {
36037
- var osRelease = os8.release().split(".");
36037
+ var osRelease = os9.release().split(".");
36038
36038
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
36039
36039
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
36040
36040
  }
@@ -40383,11 +40383,11 @@ var require_lodash = __commonJS({
40383
40383
  return isFunction(object2[key]);
40384
40384
  });
40385
40385
  }
40386
- function baseGet(object2, path16) {
40387
- path16 = castPath(path16, object2);
40388
- var index = 0, length = path16.length;
40386
+ function baseGet(object2, path17) {
40387
+ path17 = castPath(path17, object2);
40388
+ var index = 0, length = path17.length;
40389
40389
  while (object2 != null && index < length) {
40390
- object2 = object2[toKey(path16[index++])];
40390
+ object2 = object2[toKey(path17[index++])];
40391
40391
  }
40392
40392
  return index && index == length ? object2 : undefined2;
40393
40393
  }
@@ -40451,10 +40451,10 @@ var require_lodash = __commonJS({
40451
40451
  });
40452
40452
  return accumulator;
40453
40453
  }
40454
- function baseInvoke(object2, path16, args) {
40455
- path16 = castPath(path16, object2);
40456
- object2 = parent(object2, path16);
40457
- var func = object2 == null ? object2 : object2[toKey(last(path16))];
40454
+ function baseInvoke(object2, path17, args) {
40455
+ path17 = castPath(path17, object2);
40456
+ object2 = parent(object2, path17);
40457
+ var func = object2 == null ? object2 : object2[toKey(last(path17))];
40458
40458
  return func == null ? undefined2 : apply(func, object2, args);
40459
40459
  }
40460
40460
  function baseIsArguments(value) {
@@ -40610,13 +40610,13 @@ var require_lodash = __commonJS({
40610
40610
  return object2 === source || baseIsMatch(object2, source, matchData);
40611
40611
  };
40612
40612
  }
40613
- function baseMatchesProperty(path16, srcValue) {
40614
- if (isKey(path16) && isStrictComparable(srcValue)) {
40615
- return matchesStrictComparable(toKey(path16), srcValue);
40613
+ function baseMatchesProperty(path17, srcValue) {
40614
+ if (isKey(path17) && isStrictComparable(srcValue)) {
40615
+ return matchesStrictComparable(toKey(path17), srcValue);
40616
40616
  }
40617
40617
  return function(object2) {
40618
- var objValue = get(object2, path16);
40619
- return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path16) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
40618
+ var objValue = get(object2, path17);
40619
+ return objValue === undefined2 && objValue === srcValue ? hasIn(object2, path17) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
40620
40620
  };
40621
40621
  }
40622
40622
  function baseMerge(object2, source, srcIndex, customizer, stack) {
@@ -40713,23 +40713,23 @@ var require_lodash = __commonJS({
40713
40713
  });
40714
40714
  }
40715
40715
  function basePick(object2, paths) {
40716
- return basePickBy(object2, paths, function(value, path16) {
40717
- return hasIn(object2, path16);
40716
+ return basePickBy(object2, paths, function(value, path17) {
40717
+ return hasIn(object2, path17);
40718
40718
  });
40719
40719
  }
40720
40720
  function basePickBy(object2, paths, predicate) {
40721
40721
  var index = -1, length = paths.length, result2 = {};
40722
40722
  while (++index < length) {
40723
- var path16 = paths[index], value = baseGet(object2, path16);
40724
- if (predicate(value, path16)) {
40725
- baseSet(result2, castPath(path16, object2), value);
40723
+ var path17 = paths[index], value = baseGet(object2, path17);
40724
+ if (predicate(value, path17)) {
40725
+ baseSet(result2, castPath(path17, object2), value);
40726
40726
  }
40727
40727
  }
40728
40728
  return result2;
40729
40729
  }
40730
- function basePropertyDeep(path16) {
40730
+ function basePropertyDeep(path17) {
40731
40731
  return function(object2) {
40732
- return baseGet(object2, path16);
40732
+ return baseGet(object2, path17);
40733
40733
  };
40734
40734
  }
40735
40735
  function basePullAll(array2, values2, iteratee2, comparator) {
@@ -40803,14 +40803,14 @@ var require_lodash = __commonJS({
40803
40803
  var array2 = values(collection);
40804
40804
  return shuffleSelf(array2, baseClamp(n, 0, array2.length));
40805
40805
  }
40806
- function baseSet(object2, path16, value, customizer) {
40806
+ function baseSet(object2, path17, value, customizer) {
40807
40807
  if (!isObject2(object2)) {
40808
40808
  return object2;
40809
40809
  }
40810
- path16 = castPath(path16, object2);
40811
- var index = -1, length = path16.length, lastIndex = length - 1, nested = object2;
40810
+ path17 = castPath(path17, object2);
40811
+ var index = -1, length = path17.length, lastIndex = length - 1, nested = object2;
40812
40812
  while (nested != null && ++index < length) {
40813
- var key = toKey(path16[index]), newValue = value;
40813
+ var key = toKey(path17[index]), newValue = value;
40814
40814
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
40815
40815
  return object2;
40816
40816
  }
@@ -40818,7 +40818,7 @@ var require_lodash = __commonJS({
40818
40818
  var objValue = nested[key];
40819
40819
  newValue = customizer ? customizer(objValue, key, nested) : undefined2;
40820
40820
  if (newValue === undefined2) {
40821
- newValue = isObject2(objValue) ? objValue : isIndex(path16[index + 1]) ? [] : {};
40821
+ newValue = isObject2(objValue) ? objValue : isIndex(path17[index + 1]) ? [] : {};
40822
40822
  }
40823
40823
  }
40824
40824
  assignValue(nested, key, newValue);
@@ -40984,14 +40984,14 @@ var require_lodash = __commonJS({
40984
40984
  }
40985
40985
  return result2;
40986
40986
  }
40987
- function baseUnset(object2, path16) {
40988
- path16 = castPath(path16, object2);
40989
- var index = -1, length = path16.length;
40987
+ function baseUnset(object2, path17) {
40988
+ path17 = castPath(path17, object2);
40989
+ var index = -1, length = path17.length;
40990
40990
  if (!length) {
40991
40991
  return true;
40992
40992
  }
40993
40993
  while (++index < length) {
40994
- var key = toKey(path16[index]);
40994
+ var key = toKey(path17[index]);
40995
40995
  if (key === "__proto__" && !hasOwnProperty.call(object2, "__proto__")) {
40996
40996
  return false;
40997
40997
  }
@@ -40999,11 +40999,11 @@ var require_lodash = __commonJS({
40999
40999
  return false;
41000
41000
  }
41001
41001
  }
41002
- var obj = parent(object2, path16);
41003
- return obj == null || delete obj[toKey(last(path16))];
41002
+ var obj = parent(object2, path17);
41003
+ return obj == null || delete obj[toKey(last(path17))];
41004
41004
  }
41005
- function baseUpdate(object2, path16, updater, customizer) {
41006
- return baseSet(object2, path16, updater(baseGet(object2, path16)), customizer);
41005
+ function baseUpdate(object2, path17, updater, customizer) {
41006
+ return baseSet(object2, path17, updater(baseGet(object2, path17)), customizer);
41007
41007
  }
41008
41008
  function baseWhile(array2, predicate, isDrop, fromRight) {
41009
41009
  var length = array2.length, index = fromRight ? length : -1;
@@ -41886,11 +41886,11 @@ var require_lodash = __commonJS({
41886
41886
  var match = source.match(reWrapDetails);
41887
41887
  return match ? match[1].split(reSplitDetails) : [];
41888
41888
  }
41889
- function hasPath(object2, path16, hasFunc) {
41890
- path16 = castPath(path16, object2);
41891
- var index = -1, length = path16.length, result2 = false;
41889
+ function hasPath(object2, path17, hasFunc) {
41890
+ path17 = castPath(path17, object2);
41891
+ var index = -1, length = path17.length, result2 = false;
41892
41892
  while (++index < length) {
41893
- var key = toKey(path16[index]);
41893
+ var key = toKey(path17[index]);
41894
41894
  if (!(result2 = object2 != null && hasFunc(object2, key))) {
41895
41895
  break;
41896
41896
  }
@@ -42092,8 +42092,8 @@ var require_lodash = __commonJS({
42092
42092
  return apply(func, this, otherArgs);
42093
42093
  };
42094
42094
  }
42095
- function parent(object2, path16) {
42096
- return path16.length < 2 ? object2 : baseGet(object2, baseSlice(path16, 0, -1));
42095
+ function parent(object2, path17) {
42096
+ return path17.length < 2 ? object2 : baseGet(object2, baseSlice(path17, 0, -1));
42097
42097
  }
42098
42098
  function reorder(array2, indexes) {
42099
42099
  var arrLength = array2.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array2);
@@ -42728,10 +42728,10 @@ var require_lodash = __commonJS({
42728
42728
  }
42729
42729
  return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
42730
42730
  }
42731
- var invokeMap = baseRest(function(collection, path16, args) {
42732
- var index = -1, isFunc = typeof path16 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
42731
+ var invokeMap = baseRest(function(collection, path17, args) {
42732
+ var index = -1, isFunc = typeof path17 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
42733
42733
  baseEach(collection, function(value) {
42734
- result2[++index] = isFunc ? apply(path16, value, args) : baseInvoke(value, path16, args);
42734
+ result2[++index] = isFunc ? apply(path17, value, args) : baseInvoke(value, path17, args);
42735
42735
  });
42736
42736
  return result2;
42737
42737
  });
@@ -43383,15 +43383,15 @@ var require_lodash = __commonJS({
43383
43383
  function functionsIn(object2) {
43384
43384
  return object2 == null ? [] : baseFunctions(object2, keysIn(object2));
43385
43385
  }
43386
- function get(object2, path16, defaultValue) {
43387
- var result2 = object2 == null ? undefined2 : baseGet(object2, path16);
43386
+ function get(object2, path17, defaultValue) {
43387
+ var result2 = object2 == null ? undefined2 : baseGet(object2, path17);
43388
43388
  return result2 === undefined2 ? defaultValue : result2;
43389
43389
  }
43390
- function has(object2, path16) {
43391
- return object2 != null && hasPath(object2, path16, baseHas);
43390
+ function has(object2, path17) {
43391
+ return object2 != null && hasPath(object2, path17, baseHas);
43392
43392
  }
43393
- function hasIn(object2, path16) {
43394
- return object2 != null && hasPath(object2, path16, baseHasIn);
43393
+ function hasIn(object2, path17) {
43394
+ return object2 != null && hasPath(object2, path17, baseHasIn);
43395
43395
  }
43396
43396
  var invert = createInverter(function(result2, value, key) {
43397
43397
  if (value != null && typeof value.toString != "function") {
@@ -43444,10 +43444,10 @@ var require_lodash = __commonJS({
43444
43444
  return result2;
43445
43445
  }
43446
43446
  var isDeep = false;
43447
- paths = arrayMap(paths, function(path16) {
43448
- path16 = castPath(path16, object2);
43449
- isDeep || (isDeep = path16.length > 1);
43450
- return path16;
43447
+ paths = arrayMap(paths, function(path17) {
43448
+ path17 = castPath(path17, object2);
43449
+ isDeep || (isDeep = path17.length > 1);
43450
+ return path17;
43451
43451
  });
43452
43452
  copyObject(object2, getAllKeysIn(object2), result2);
43453
43453
  if (isDeep) {
@@ -43473,19 +43473,19 @@ var require_lodash = __commonJS({
43473
43473
  return [prop];
43474
43474
  });
43475
43475
  predicate = getIteratee(predicate);
43476
- return basePickBy(object2, props, function(value, path16) {
43477
- return predicate(value, path16[0]);
43476
+ return basePickBy(object2, props, function(value, path17) {
43477
+ return predicate(value, path17[0]);
43478
43478
  });
43479
43479
  }
43480
- function result(object2, path16, defaultValue) {
43481
- path16 = castPath(path16, object2);
43482
- var index = -1, length = path16.length;
43480
+ function result(object2, path17, defaultValue) {
43481
+ path17 = castPath(path17, object2);
43482
+ var index = -1, length = path17.length;
43483
43483
  if (!length) {
43484
43484
  length = 1;
43485
43485
  object2 = undefined2;
43486
43486
  }
43487
43487
  while (++index < length) {
43488
- var value = object2 == null ? undefined2 : object2[toKey(path16[index])];
43488
+ var value = object2 == null ? undefined2 : object2[toKey(path17[index])];
43489
43489
  if (value === undefined2) {
43490
43490
  index = length;
43491
43491
  value = defaultValue;
@@ -43494,12 +43494,12 @@ var require_lodash = __commonJS({
43494
43494
  }
43495
43495
  return object2;
43496
43496
  }
43497
- function set2(object2, path16, value) {
43498
- return object2 == null ? object2 : baseSet(object2, path16, value);
43497
+ function set2(object2, path17, value) {
43498
+ return object2 == null ? object2 : baseSet(object2, path17, value);
43499
43499
  }
43500
- function setWith(object2, path16, value, customizer) {
43500
+ function setWith(object2, path17, value, customizer) {
43501
43501
  customizer = typeof customizer == "function" ? customizer : undefined2;
43502
- return object2 == null ? object2 : baseSet(object2, path16, value, customizer);
43502
+ return object2 == null ? object2 : baseSet(object2, path17, value, customizer);
43503
43503
  }
43504
43504
  var toPairs = createToPairs(keys);
43505
43505
  var toPairsIn = createToPairs(keysIn);
@@ -43521,15 +43521,15 @@ var require_lodash = __commonJS({
43521
43521
  });
43522
43522
  return accumulator;
43523
43523
  }
43524
- function unset(object2, path16) {
43525
- return object2 == null ? true : baseUnset(object2, path16);
43524
+ function unset(object2, path17) {
43525
+ return object2 == null ? true : baseUnset(object2, path17);
43526
43526
  }
43527
- function update2(object2, path16, updater) {
43528
- return object2 == null ? object2 : baseUpdate(object2, path16, castFunction(updater));
43527
+ function update2(object2, path17, updater) {
43528
+ return object2 == null ? object2 : baseUpdate(object2, path17, castFunction(updater));
43529
43529
  }
43530
- function updateWith(object2, path16, updater, customizer) {
43530
+ function updateWith(object2, path17, updater, customizer) {
43531
43531
  customizer = typeof customizer == "function" ? customizer : undefined2;
43532
- return object2 == null ? object2 : baseUpdate(object2, path16, castFunction(updater), customizer);
43532
+ return object2 == null ? object2 : baseUpdate(object2, path17, castFunction(updater), customizer);
43533
43533
  }
43534
43534
  function values(object2) {
43535
43535
  return object2 == null ? [] : baseValues(object2, keys(object2));
@@ -43915,17 +43915,17 @@ var require_lodash = __commonJS({
43915
43915
  function matches(source) {
43916
43916
  return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
43917
43917
  }
43918
- function matchesProperty(path16, srcValue) {
43919
- return baseMatchesProperty(path16, baseClone(srcValue, CLONE_DEEP_FLAG));
43918
+ function matchesProperty(path17, srcValue) {
43919
+ return baseMatchesProperty(path17, baseClone(srcValue, CLONE_DEEP_FLAG));
43920
43920
  }
43921
- var method = baseRest(function(path16, args) {
43921
+ var method = baseRest(function(path17, args) {
43922
43922
  return function(object2) {
43923
- return baseInvoke(object2, path16, args);
43923
+ return baseInvoke(object2, path17, args);
43924
43924
  };
43925
43925
  });
43926
43926
  var methodOf = baseRest(function(object2, args) {
43927
- return function(path16) {
43928
- return baseInvoke(object2, path16, args);
43927
+ return function(path17) {
43928
+ return baseInvoke(object2, path17, args);
43929
43929
  };
43930
43930
  });
43931
43931
  function mixin(object2, source, options) {
@@ -43972,12 +43972,12 @@ var require_lodash = __commonJS({
43972
43972
  var over = createOver(arrayMap);
43973
43973
  var overEvery = createOver(arrayEvery);
43974
43974
  var overSome = createOver(arraySome);
43975
- function property(path16) {
43976
- return isKey(path16) ? baseProperty(toKey(path16)) : basePropertyDeep(path16);
43975
+ function property(path17) {
43976
+ return isKey(path17) ? baseProperty(toKey(path17)) : basePropertyDeep(path17);
43977
43977
  }
43978
43978
  function propertyOf(object2) {
43979
- return function(path16) {
43980
- return object2 == null ? undefined2 : baseGet(object2, path16);
43979
+ return function(path17) {
43980
+ return object2 == null ? undefined2 : baseGet(object2, path17);
43981
43981
  };
43982
43982
  }
43983
43983
  var range = createRange();
@@ -44430,12 +44430,12 @@ var require_lodash = __commonJS({
44430
44430
  LazyWrapper.prototype.findLast = function(predicate) {
44431
44431
  return this.reverse().find(predicate);
44432
44432
  };
44433
- LazyWrapper.prototype.invokeMap = baseRest(function(path16, args) {
44434
- if (typeof path16 == "function") {
44433
+ LazyWrapper.prototype.invokeMap = baseRest(function(path17, args) {
44434
+ if (typeof path17 == "function") {
44435
44435
  return new LazyWrapper(this);
44436
44436
  }
44437
44437
  return this.map(function(value) {
44438
- return baseInvoke(value, path16, args);
44438
+ return baseInvoke(value, path17, args);
44439
44439
  });
44440
44440
  });
44441
44441
  LazyWrapper.prototype.reject = function(predicate) {
@@ -45477,15 +45477,15 @@ var require_route2 = __commonJS({
45477
45477
  };
45478
45478
  }
45479
45479
  function wrapConversion(toModel, graph) {
45480
- var path16 = [graph[toModel].parent, toModel];
45480
+ var path17 = [graph[toModel].parent, toModel];
45481
45481
  var fn2 = conversions[graph[toModel].parent][toModel];
45482
45482
  var cur = graph[toModel].parent;
45483
45483
  while (graph[cur].parent) {
45484
- path16.unshift(graph[cur].parent);
45484
+ path17.unshift(graph[cur].parent);
45485
45485
  fn2 = link(conversions[graph[cur].parent][cur], fn2);
45486
45486
  cur = graph[cur].parent;
45487
45487
  }
45488
- fn2.conversion = path16;
45488
+ fn2.conversion = path17;
45489
45489
  return fn2;
45490
45490
  }
45491
45491
  module2.exports = function(fromModel) {
@@ -45725,7 +45725,7 @@ var require_has_flag3 = __commonJS({
45725
45725
  var require_supports_color2 = __commonJS({
45726
45726
  "node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
45727
45727
  "use strict";
45728
- var os8 = require("os");
45728
+ var os9 = require("os");
45729
45729
  var hasFlag = require_has_flag3();
45730
45730
  var env = process.env;
45731
45731
  var forceColor;
@@ -45763,7 +45763,7 @@ var require_supports_color2 = __commonJS({
45763
45763
  }
45764
45764
  const min = forceColor ? 1 : 0;
45765
45765
  if (process.platform === "win32") {
45766
- const osRelease = os8.release().split(".");
45766
+ const osRelease = os9.release().split(".");
45767
45767
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
45768
45768
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
45769
45769
  }
@@ -51920,8 +51920,8 @@ var require_rx_lite = __commonJS({
51920
51920
  checkDisposed(this);
51921
51921
  if (!this.isStopped) {
51922
51922
  this.isStopped = true;
51923
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
51924
- os8[i].onCompleted();
51923
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
51924
+ os9[i].onCompleted();
51925
51925
  }
51926
51926
  this.observers.length = 0;
51927
51927
  }
@@ -51936,8 +51936,8 @@ var require_rx_lite = __commonJS({
51936
51936
  this.isStopped = true;
51937
51937
  this.error = error49;
51938
51938
  this.hasError = true;
51939
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
51940
- os8[i].onError(error49);
51939
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
51940
+ os9[i].onError(error49);
51941
51941
  }
51942
51942
  this.observers.length = 0;
51943
51943
  }
@@ -51949,8 +51949,8 @@ var require_rx_lite = __commonJS({
51949
51949
  onNext: function(value) {
51950
51950
  checkDisposed(this);
51951
51951
  if (!this.isStopped) {
51952
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
51953
- os8[i].onNext(value);
51952
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
51953
+ os9[i].onNext(value);
51954
51954
  }
51955
51955
  }
51956
51956
  },
@@ -52010,16 +52010,16 @@ var require_rx_lite = __commonJS({
52010
52010
  checkDisposed(this);
52011
52011
  if (!this.isStopped) {
52012
52012
  this.isStopped = true;
52013
- var os8 = cloneArray(this.observers), len = os8.length;
52013
+ var os9 = cloneArray(this.observers), len = os9.length;
52014
52014
  if (this.hasValue) {
52015
52015
  for (i = 0; i < len; i++) {
52016
- var o = os8[i];
52016
+ var o = os9[i];
52017
52017
  o.onNext(this.value);
52018
52018
  o.onCompleted();
52019
52019
  }
52020
52020
  } else {
52021
52021
  for (i = 0; i < len; i++) {
52022
- os8[i].onCompleted();
52022
+ os9[i].onCompleted();
52023
52023
  }
52024
52024
  }
52025
52025
  this.observers.length = 0;
@@ -52035,8 +52035,8 @@ var require_rx_lite = __commonJS({
52035
52035
  this.isStopped = true;
52036
52036
  this.hasError = true;
52037
52037
  this.error = error49;
52038
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52039
- os8[i].onError(error49);
52038
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52039
+ os9[i].onError(error49);
52040
52040
  }
52041
52041
  this.observers.length = 0;
52042
52042
  }
@@ -52144,8 +52144,8 @@ var require_rx_lite = __commonJS({
52144
52144
  return;
52145
52145
  }
52146
52146
  this.isStopped = true;
52147
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52148
- os8[i].onCompleted();
52147
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52148
+ os9[i].onCompleted();
52149
52149
  }
52150
52150
  this.observers.length = 0;
52151
52151
  },
@@ -52161,8 +52161,8 @@ var require_rx_lite = __commonJS({
52161
52161
  this.isStopped = true;
52162
52162
  this.hasError = true;
52163
52163
  this.error = error49;
52164
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52165
- os8[i].onError(error49);
52164
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52165
+ os9[i].onError(error49);
52166
52166
  }
52167
52167
  this.observers.length = 0;
52168
52168
  },
@@ -52176,8 +52176,8 @@ var require_rx_lite = __commonJS({
52176
52176
  return;
52177
52177
  }
52178
52178
  this.value = value;
52179
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52180
- os8[i].onNext(value);
52179
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52180
+ os9[i].onNext(value);
52181
52181
  }
52182
52182
  },
52183
52183
  /**
@@ -52258,8 +52258,8 @@ var require_rx_lite = __commonJS({
52258
52258
  var now = this.scheduler.now();
52259
52259
  this.q.push({ interval: now, value });
52260
52260
  this._trim(now);
52261
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52262
- var observer = os8[i];
52261
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52262
+ var observer = os9[i];
52263
52263
  observer.onNext(value);
52264
52264
  observer.ensureActive();
52265
52265
  }
@@ -52278,8 +52278,8 @@ var require_rx_lite = __commonJS({
52278
52278
  this.hasError = true;
52279
52279
  var now = this.scheduler.now();
52280
52280
  this._trim(now);
52281
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52282
- var observer = os8[i];
52281
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52282
+ var observer = os9[i];
52283
52283
  observer.onError(error49);
52284
52284
  observer.ensureActive();
52285
52285
  }
@@ -52296,8 +52296,8 @@ var require_rx_lite = __commonJS({
52296
52296
  this.isStopped = true;
52297
52297
  var now = this.scheduler.now();
52298
52298
  this._trim(now);
52299
- for (var i = 0, os8 = cloneArray(this.observers), len = os8.length; i < len; i++) {
52300
- var observer = os8[i];
52299
+ for (var i = 0, os9 = cloneArray(this.observers), len = os9.length; i < len; i++) {
52300
+ var observer = os9[i];
52301
52301
  observer.onCompleted();
52302
52302
  observer.ensureActive();
52303
52303
  }
@@ -54562,14 +54562,14 @@ var require_util2 = __commonJS({
54562
54562
  }
54563
54563
  const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
54564
54564
  let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
54565
- let path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
54565
+ let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
54566
54566
  if (origin[origin.length - 1] === "/") {
54567
54567
  origin = origin.slice(0, origin.length - 1);
54568
54568
  }
54569
- if (path16 && path16[0] !== "/") {
54570
- path16 = `/${path16}`;
54569
+ if (path17 && path17[0] !== "/") {
54570
+ path17 = `/${path17}`;
54571
54571
  }
54572
- return new URL(`${origin}${path16}`);
54572
+ return new URL(`${origin}${path17}`);
54573
54573
  }
54574
54574
  if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
54575
54575
  throw new InvalidArgumentError2("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -55020,39 +55020,39 @@ var require_diagnostics = __commonJS({
55020
55020
  });
55021
55021
  diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
55022
55022
  const {
55023
- request: { method, path: path16, origin }
55023
+ request: { method, path: path17, origin }
55024
55024
  } = evt;
55025
- debuglog("sending request to %s %s/%s", method, origin, path16);
55025
+ debuglog("sending request to %s %s/%s", method, origin, path17);
55026
55026
  });
55027
55027
  diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => {
55028
55028
  const {
55029
- request: { method, path: path16, origin },
55029
+ request: { method, path: path17, origin },
55030
55030
  response: { statusCode }
55031
55031
  } = evt;
55032
55032
  debuglog(
55033
55033
  "received response to %s %s/%s - HTTP %d",
55034
55034
  method,
55035
55035
  origin,
55036
- path16,
55036
+ path17,
55037
55037
  statusCode
55038
55038
  );
55039
55039
  });
55040
55040
  diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => {
55041
55041
  const {
55042
- request: { method, path: path16, origin }
55042
+ request: { method, path: path17, origin }
55043
55043
  } = evt;
55044
- debuglog("trailers received from %s %s/%s", method, origin, path16);
55044
+ debuglog("trailers received from %s %s/%s", method, origin, path17);
55045
55045
  });
55046
55046
  diagnosticsChannel.channel("undici:request:error").subscribe((evt) => {
55047
55047
  const {
55048
- request: { method, path: path16, origin },
55048
+ request: { method, path: path17, origin },
55049
55049
  error: error49
55050
55050
  } = evt;
55051
55051
  debuglog(
55052
55052
  "request to %s %s/%s errored - %s",
55053
55053
  method,
55054
55054
  origin,
55055
- path16,
55055
+ path17,
55056
55056
  error49.message
55057
55057
  );
55058
55058
  });
@@ -55101,9 +55101,9 @@ var require_diagnostics = __commonJS({
55101
55101
  });
55102
55102
  diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => {
55103
55103
  const {
55104
- request: { method, path: path16, origin }
55104
+ request: { method, path: path17, origin }
55105
55105
  } = evt;
55106
- debuglog("sending request to %s %s/%s", method, origin, path16);
55106
+ debuglog("sending request to %s %s/%s", method, origin, path17);
55107
55107
  });
55108
55108
  }
55109
55109
  diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => {
@@ -55166,7 +55166,7 @@ var require_request = __commonJS({
55166
55166
  var kHandler = /* @__PURE__ */ Symbol("handler");
55167
55167
  var Request = class {
55168
55168
  constructor(origin, {
55169
- path: path16,
55169
+ path: path17,
55170
55170
  method,
55171
55171
  body,
55172
55172
  headers,
@@ -55181,11 +55181,11 @@ var require_request = __commonJS({
55181
55181
  expectContinue,
55182
55182
  servername
55183
55183
  }, handler) {
55184
- if (typeof path16 !== "string") {
55184
+ if (typeof path17 !== "string") {
55185
55185
  throw new InvalidArgumentError2("path must be a string");
55186
- } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") {
55186
+ } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") {
55187
55187
  throw new InvalidArgumentError2("path must be an absolute URL or start with a slash");
55188
- } else if (invalidPathRegex.test(path16)) {
55188
+ } else if (invalidPathRegex.test(path17)) {
55189
55189
  throw new InvalidArgumentError2("invalid request path");
55190
55190
  }
55191
55191
  if (typeof method !== "string") {
@@ -55251,7 +55251,7 @@ var require_request = __commonJS({
55251
55251
  this.completed = false;
55252
55252
  this.aborted = false;
55253
55253
  this.upgrade = upgrade || null;
55254
- this.path = query ? buildURL(path16, query) : path16;
55254
+ this.path = query ? buildURL(path17, query) : path17;
55255
55255
  this.origin = origin;
55256
55256
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
55257
55257
  this.blocking = blocking == null ? false : blocking;
@@ -59777,7 +59777,7 @@ var require_client_h1 = __commonJS({
59777
59777
  return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
59778
59778
  }
59779
59779
  function writeH1(client2, request) {
59780
- const { method, path: path16, host, upgrade, blocking, reset } = request;
59780
+ const { method, path: path17, host, upgrade, blocking, reset } = request;
59781
59781
  let { body, headers, contentLength } = request;
59782
59782
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
59783
59783
  if (util.isFormDataLike(body)) {
@@ -59843,7 +59843,7 @@ var require_client_h1 = __commonJS({
59843
59843
  if (blocking) {
59844
59844
  socket[kBlocking] = true;
59845
59845
  }
59846
- let header = `${method} ${path16} HTTP/1.1\r
59846
+ let header = `${method} ${path17} HTTP/1.1\r
59847
59847
  `;
59848
59848
  if (typeof host === "string") {
59849
59849
  header += `host: ${host}\r
@@ -60369,7 +60369,7 @@ var require_client_h2 = __commonJS({
60369
60369
  }
60370
60370
  function writeH2(client2, request) {
60371
60371
  const session = client2[kHTTP2Session];
60372
- const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
60372
+ const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request;
60373
60373
  let { body } = request;
60374
60374
  if (upgrade) {
60375
60375
  util.errorRequest(client2, request, new Error("Upgrade not supported for H2"));
@@ -60436,7 +60436,7 @@ var require_client_h2 = __commonJS({
60436
60436
  });
60437
60437
  return true;
60438
60438
  }
60439
- headers[HTTP2_HEADER_PATH] = path16;
60439
+ headers[HTTP2_HEADER_PATH] = path17;
60440
60440
  headers[HTTP2_HEADER_SCHEME] = "https";
60441
60441
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
60442
60442
  if (body && typeof body.read === "function") {
@@ -60789,9 +60789,9 @@ var require_redirect_handler = __commonJS({
60789
60789
  return this.handler.onHeaders(statusCode, headers, resume, statusText);
60790
60790
  }
60791
60791
  const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
60792
- const path16 = search ? `${pathname}${search}` : pathname;
60792
+ const path17 = search ? `${pathname}${search}` : pathname;
60793
60793
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
60794
- this.opts.path = path16;
60794
+ this.opts.path = path17;
60795
60795
  this.opts.origin = origin;
60796
60796
  this.opts.maxRedirections = 0;
60797
60797
  this.opts.query = null;
@@ -62026,10 +62026,10 @@ var require_proxy_agent = __commonJS({
62026
62026
  };
62027
62027
  const {
62028
62028
  origin,
62029
- path: path16 = "/",
62029
+ path: path17 = "/",
62030
62030
  headers = {}
62031
62031
  } = opts;
62032
- opts.path = origin + path16;
62032
+ opts.path = origin + path17;
62033
62033
  if (!("host" in headers) && !("Host" in headers)) {
62034
62034
  const { host } = new URL2(origin);
62035
62035
  headers.host = host;
@@ -63950,20 +63950,20 @@ var require_mock_utils = __commonJS({
63950
63950
  }
63951
63951
  return true;
63952
63952
  }
63953
- function safeUrl(path16) {
63954
- if (typeof path16 !== "string") {
63955
- return path16;
63953
+ function safeUrl(path17) {
63954
+ if (typeof path17 !== "string") {
63955
+ return path17;
63956
63956
  }
63957
- const pathSegments = path16.split("?");
63957
+ const pathSegments = path17.split("?");
63958
63958
  if (pathSegments.length !== 2) {
63959
- return path16;
63959
+ return path17;
63960
63960
  }
63961
63961
  const qp = new URLSearchParams(pathSegments.pop());
63962
63962
  qp.sort();
63963
63963
  return [...pathSegments, qp.toString()].join("?");
63964
63964
  }
63965
- function matchKey(mockDispatch2, { path: path16, method, body, headers }) {
63966
- const pathMatch = matchValue(mockDispatch2.path, path16);
63965
+ function matchKey(mockDispatch2, { path: path17, method, body, headers }) {
63966
+ const pathMatch = matchValue(mockDispatch2.path, path17);
63967
63967
  const methodMatch = matchValue(mockDispatch2.method, method);
63968
63968
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
63969
63969
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -63985,7 +63985,7 @@ var require_mock_utils = __commonJS({
63985
63985
  function getMockDispatch(mockDispatches, key) {
63986
63986
  const basePath = key.query ? buildURL(key.path, key.query) : key.path;
63987
63987
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
63988
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath));
63988
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath));
63989
63989
  if (matchedMockDispatches.length === 0) {
63990
63990
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
63991
63991
  }
@@ -64023,9 +64023,9 @@ var require_mock_utils = __commonJS({
64023
64023
  }
64024
64024
  }
64025
64025
  function buildKey(opts) {
64026
- const { path: path16, method, body, headers, query } = opts;
64026
+ const { path: path17, method, body, headers, query } = opts;
64027
64027
  return {
64028
- path: path16,
64028
+ path: path17,
64029
64029
  method,
64030
64030
  body,
64031
64031
  headers,
@@ -64488,10 +64488,10 @@ var require_pending_interceptors_formatter = __commonJS({
64488
64488
  }
64489
64489
  format(pendingInterceptors) {
64490
64490
  const withPrettyHeaders = pendingInterceptors.map(
64491
- ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
64491
+ ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
64492
64492
  Method: method,
64493
64493
  Origin: origin,
64494
- Path: path16,
64494
+ Path: path17,
64495
64495
  "Status code": statusCode,
64496
64496
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
64497
64497
  Invocations: timesInvoked,
@@ -69372,9 +69372,9 @@ var require_util7 = __commonJS({
69372
69372
  }
69373
69373
  }
69374
69374
  }
69375
- function validateCookiePath(path16) {
69376
- for (let i = 0; i < path16.length; ++i) {
69377
- const code = path16.charCodeAt(i);
69375
+ function validateCookiePath(path17) {
69376
+ for (let i = 0; i < path17.length; ++i) {
69377
+ const code = path17.charCodeAt(i);
69378
69378
  if (code < 32 || // exclude CTLs (0-31)
69379
69379
  code === 127 || // DEL
69380
69380
  code === 59) {
@@ -72051,11 +72051,11 @@ var require_undici = __commonJS({
72051
72051
  if (typeof opts.path !== "string") {
72052
72052
  throw new InvalidArgumentError2("invalid opts.path");
72053
72053
  }
72054
- let path16 = opts.path;
72054
+ let path17 = opts.path;
72055
72055
  if (!opts.path.startsWith("/")) {
72056
- path16 = `/${path16}`;
72056
+ path17 = `/${path17}`;
72057
72057
  }
72058
- url2 = new URL(util.parseOrigin(url2).origin + path16);
72058
+ url2 = new URL(util.parseOrigin(url2).origin + path17);
72059
72059
  } else {
72060
72060
  if (!opts) {
72061
72061
  opts = typeof url2 === "object" ? url2 : {};
@@ -72423,7 +72423,7 @@ var require_ignore = __commonJS({
72423
72423
  // path matching.
72424
72424
  // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
72425
72425
  // @returns {TestResult} true if a file is ignored
72426
- test(path16, checkUnignored, mode) {
72426
+ test(path17, checkUnignored, mode) {
72427
72427
  let ignored = false;
72428
72428
  let unignored = false;
72429
72429
  let matchedRule;
@@ -72432,7 +72432,7 @@ var require_ignore = __commonJS({
72432
72432
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
72433
72433
  return;
72434
72434
  }
72435
- const matched = rule[mode].test(path16);
72435
+ const matched = rule[mode].test(path17);
72436
72436
  if (!matched) {
72437
72437
  return;
72438
72438
  }
@@ -72453,17 +72453,17 @@ var require_ignore = __commonJS({
72453
72453
  var throwError = (message, Ctor) => {
72454
72454
  throw new Ctor(message);
72455
72455
  };
72456
- var checkPath = (path16, originalPath, doThrow) => {
72457
- if (!isString(path16)) {
72456
+ var checkPath = (path17, originalPath, doThrow) => {
72457
+ if (!isString(path17)) {
72458
72458
  return doThrow(
72459
72459
  `path must be a string, but got \`${originalPath}\``,
72460
72460
  TypeError
72461
72461
  );
72462
72462
  }
72463
- if (!path16) {
72463
+ if (!path17) {
72464
72464
  return doThrow(`path must not be empty`, TypeError);
72465
72465
  }
72466
- if (checkPath.isNotRelative(path16)) {
72466
+ if (checkPath.isNotRelative(path17)) {
72467
72467
  const r = "`path.relative()`d";
72468
72468
  return doThrow(
72469
72469
  `path should be a ${r} string, but got "${originalPath}"`,
@@ -72472,7 +72472,7 @@ var require_ignore = __commonJS({
72472
72472
  }
72473
72473
  return true;
72474
72474
  };
72475
- var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16);
72475
+ var isNotRelative = (path17) => REGEX_TEST_INVALID_PATH.test(path17);
72476
72476
  checkPath.isNotRelative = isNotRelative;
72477
72477
  checkPath.convert = (p2) => p2;
72478
72478
  var Ignore = class {
@@ -72502,19 +72502,19 @@ var require_ignore = __commonJS({
72502
72502
  }
72503
72503
  // @returns {TestResult}
72504
72504
  _test(originalPath, cache, checkUnignored, slices) {
72505
- const path16 = originalPath && checkPath.convert(originalPath);
72505
+ const path17 = originalPath && checkPath.convert(originalPath);
72506
72506
  checkPath(
72507
- path16,
72507
+ path17,
72508
72508
  originalPath,
72509
72509
  this._strictPathCheck ? throwError : RETURN_FALSE
72510
72510
  );
72511
- return this._t(path16, cache, checkUnignored, slices);
72511
+ return this._t(path17, cache, checkUnignored, slices);
72512
72512
  }
72513
- checkIgnore(path16) {
72514
- if (!REGEX_TEST_TRAILING_SLASH.test(path16)) {
72515
- return this.test(path16);
72513
+ checkIgnore(path17) {
72514
+ if (!REGEX_TEST_TRAILING_SLASH.test(path17)) {
72515
+ return this.test(path17);
72516
72516
  }
72517
- const slices = path16.split(SLASH).filter(Boolean);
72517
+ const slices = path17.split(SLASH).filter(Boolean);
72518
72518
  slices.pop();
72519
72519
  if (slices.length) {
72520
72520
  const parent = this._t(
@@ -72527,18 +72527,18 @@ var require_ignore = __commonJS({
72527
72527
  return parent;
72528
72528
  }
72529
72529
  }
72530
- return this._rules.test(path16, false, MODE_CHECK_IGNORE);
72530
+ return this._rules.test(path17, false, MODE_CHECK_IGNORE);
72531
72531
  }
72532
- _t(path16, cache, checkUnignored, slices) {
72533
- if (path16 in cache) {
72534
- return cache[path16];
72532
+ _t(path17, cache, checkUnignored, slices) {
72533
+ if (path17 in cache) {
72534
+ return cache[path17];
72535
72535
  }
72536
72536
  if (!slices) {
72537
- slices = path16.split(SLASH).filter(Boolean);
72537
+ slices = path17.split(SLASH).filter(Boolean);
72538
72538
  }
72539
72539
  slices.pop();
72540
72540
  if (!slices.length) {
72541
- return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE);
72541
+ return cache[path17] = this._rules.test(path17, checkUnignored, MODE_IGNORE);
72542
72542
  }
72543
72543
  const parent = this._t(
72544
72544
  slices.join(SLASH) + SLASH,
@@ -72546,29 +72546,29 @@ var require_ignore = __commonJS({
72546
72546
  checkUnignored,
72547
72547
  slices
72548
72548
  );
72549
- return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE);
72549
+ return cache[path17] = parent.ignored ? parent : this._rules.test(path17, checkUnignored, MODE_IGNORE);
72550
72550
  }
72551
- ignores(path16) {
72552
- return this._test(path16, this._ignoreCache, false).ignored;
72551
+ ignores(path17) {
72552
+ return this._test(path17, this._ignoreCache, false).ignored;
72553
72553
  }
72554
72554
  createFilter() {
72555
- return (path16) => !this.ignores(path16);
72555
+ return (path17) => !this.ignores(path17);
72556
72556
  }
72557
72557
  filter(paths) {
72558
72558
  return makeArray(paths).filter(this.createFilter());
72559
72559
  }
72560
72560
  // @returns {TestResult}
72561
- test(path16) {
72562
- return this._test(path16, this._testCache, true);
72561
+ test(path17) {
72562
+ return this._test(path17, this._testCache, true);
72563
72563
  }
72564
72564
  };
72565
72565
  var factory = (options) => new Ignore(options);
72566
- var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE);
72566
+ var isPathValid = (path17) => checkPath(path17 && checkPath.convert(path17), path17, RETURN_FALSE);
72567
72567
  var setupWindows = () => {
72568
72568
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
72569
72569
  checkPath.convert = makePosix;
72570
72570
  const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
72571
- checkPath.isNotRelative = (path16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16);
72571
+ checkPath.isNotRelative = (path17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path17) || isNotRelative(path17);
72572
72572
  };
72573
72573
  if (
72574
72574
  // Detect `process` so that it can run in browsers.
@@ -73584,8 +73584,8 @@ var require_package = __commonJS({
73584
73584
  var require_ejs = __commonJS({
73585
73585
  "node_modules/ejs/lib/ejs.js"(exports2) {
73586
73586
  "use strict";
73587
- var fs20 = require("fs");
73588
- var path16 = require("path");
73587
+ var fs21 = require("fs");
73588
+ var path17 = require("path");
73589
73589
  var utils = require_utils5();
73590
73590
  var scopeOptionWarned = false;
73591
73591
  var _VERSION_STRING = require_package().version;
@@ -73612,13 +73612,13 @@ var require_ejs = __commonJS({
73612
73612
  var _BOM = /^\uFEFF/;
73613
73613
  var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
73614
73614
  exports2.cache = utils.cache;
73615
- exports2.fileLoader = fs20.readFileSync;
73615
+ exports2.fileLoader = fs21.readFileSync;
73616
73616
  exports2.localsName = _DEFAULT_LOCALS_NAME;
73617
73617
  exports2.promiseImpl = new Function("return this;")().Promise;
73618
73618
  exports2.resolveInclude = function(name, filename, isDir) {
73619
- var dirname2 = path16.dirname;
73620
- var extname = path16.extname;
73621
- var resolve3 = path16.resolve;
73619
+ var dirname2 = path17.dirname;
73620
+ var extname = path17.extname;
73621
+ var resolve3 = path17.resolve;
73622
73622
  var includePath = resolve3(isDir ? filename : dirname2(filename), name);
73623
73623
  var ext = extname(name);
73624
73624
  if (!ext) {
@@ -73630,35 +73630,35 @@ var require_ejs = __commonJS({
73630
73630
  var filePath;
73631
73631
  if (paths.some(function(v2) {
73632
73632
  filePath = exports2.resolveInclude(name, v2, true);
73633
- return fs20.existsSync(filePath);
73633
+ return fs21.existsSync(filePath);
73634
73634
  })) {
73635
73635
  return filePath;
73636
73636
  }
73637
73637
  }
73638
- function getIncludePath(path17, options) {
73638
+ function getIncludePath(path18, options) {
73639
73639
  var includePath;
73640
73640
  var filePath;
73641
73641
  var views = options.views;
73642
- var match = /^[A-Za-z]+:\\|^\//.exec(path17);
73642
+ var match = /^[A-Za-z]+:\\|^\//.exec(path18);
73643
73643
  if (match && match.length) {
73644
- path17 = path17.replace(/^\/*/, "");
73644
+ path18 = path18.replace(/^\/*/, "");
73645
73645
  if (Array.isArray(options.root)) {
73646
- includePath = resolvePaths(path17, options.root);
73646
+ includePath = resolvePaths(path18, options.root);
73647
73647
  } else {
73648
- includePath = exports2.resolveInclude(path17, options.root || "/", true);
73648
+ includePath = exports2.resolveInclude(path18, options.root || "/", true);
73649
73649
  }
73650
73650
  } else {
73651
73651
  if (options.filename) {
73652
- filePath = exports2.resolveInclude(path17, options.filename);
73653
- if (fs20.existsSync(filePath)) {
73652
+ filePath = exports2.resolveInclude(path18, options.filename);
73653
+ if (fs21.existsSync(filePath)) {
73654
73654
  includePath = filePath;
73655
73655
  }
73656
73656
  }
73657
73657
  if (!includePath && Array.isArray(views)) {
73658
- includePath = resolvePaths(path17, views);
73658
+ includePath = resolvePaths(path18, views);
73659
73659
  }
73660
73660
  if (!includePath && typeof options.includer !== "function") {
73661
- throw new Error('Could not find the include file "' + options.escapeFunction(path17) + '"');
73661
+ throw new Error('Could not find the include file "' + options.escapeFunction(path18) + '"');
73662
73662
  }
73663
73663
  }
73664
73664
  return includePath;
@@ -73717,11 +73717,11 @@ var require_ejs = __commonJS({
73717
73717
  function fileLoader(filePath) {
73718
73718
  return exports2.fileLoader(filePath);
73719
73719
  }
73720
- function includeFile(path17, options) {
73720
+ function includeFile(path18, options) {
73721
73721
  var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
73722
- opts.filename = getIncludePath(path17, opts);
73722
+ opts.filename = getIncludePath(path18, opts);
73723
73723
  if (typeof options.includer === "function") {
73724
- var includerResult = options.includer(path17, opts.filename);
73724
+ var includerResult = options.includer(path18, opts.filename);
73725
73725
  if (includerResult) {
73726
73726
  if (includerResult.filename) {
73727
73727
  opts.filename = includerResult.filename;
@@ -73956,12 +73956,12 @@ var require_ejs = __commonJS({
73956
73956
  throw e;
73957
73957
  }
73958
73958
  var returnedFn = opts.client ? fn2 : function anonymous(data) {
73959
- var include = function(path17, includeData) {
73959
+ var include = function(path18, includeData) {
73960
73960
  var d = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
73961
73961
  if (includeData) {
73962
73962
  d = utils.shallowCopy(d, includeData);
73963
73963
  }
73964
- return includeFile(path17, opts)(d);
73964
+ return includeFile(path18, opts)(d);
73965
73965
  };
73966
73966
  return fn2.apply(
73967
73967
  opts.context,
@@ -73970,7 +73970,7 @@ var require_ejs = __commonJS({
73970
73970
  };
73971
73971
  if (opts.filename && typeof Object.defineProperty === "function") {
73972
73972
  var filename = opts.filename;
73973
- var basename = path16.basename(filename, path16.extname(filename));
73973
+ var basename = path17.basename(filename, path17.extname(filename));
73974
73974
  try {
73975
73975
  Object.defineProperty(returnedFn, "name", {
73976
73976
  value: basename,
@@ -74134,8 +74134,8 @@ var require_ejs = __commonJS({
74134
74134
  var require_tail = __commonJS({
74135
74135
  "node_modules/tail/lib/tail.js"(exports2) {
74136
74136
  var events = require("events");
74137
- var fs20 = require("fs");
74138
- var path16 = require("path");
74137
+ var fs21 = require("fs");
74138
+ var path17 = require("path");
74139
74139
  var devNull = class {
74140
74140
  info() {
74141
74141
  }
@@ -74146,7 +74146,7 @@ var require_tail = __commonJS({
74146
74146
  constructor(filename, options = {}) {
74147
74147
  super();
74148
74148
  this.filename = filename;
74149
- this.absPath = path16.dirname(this.filename);
74149
+ this.absPath = path17.dirname(this.filename);
74150
74150
  this.separator = options.separator !== void 0 ? options.separator : /[\r]{0,1}\n/;
74151
74151
  this.fsWatchOptions = options.fsWatchOptions || {};
74152
74152
  this.follow = options["follow"] != void 0 ? options["follow"] : true;
@@ -74160,7 +74160,7 @@ var require_tail = __commonJS({
74160
74160
  this.logger.info(`filename: ${this.filename}`);
74161
74161
  this.logger.info(`encoding: ${this.encoding}`);
74162
74162
  try {
74163
- fs20.accessSync(this.filename, fs20.constants.F_OK);
74163
+ fs21.accessSync(this.filename, fs21.constants.F_OK);
74164
74164
  } catch (err) {
74165
74165
  if (err.code == "ENOENT") {
74166
74166
  throw err;
@@ -74235,11 +74235,11 @@ var require_tail = __commonJS({
74235
74235
  * @returns {number}
74236
74236
  */
74237
74237
  getPositionAtNthLine(nLines) {
74238
- const { size } = fs20.statSync(this.filename);
74238
+ const { size } = fs21.statSync(this.filename);
74239
74239
  if (size === 0) {
74240
74240
  return 0;
74241
74241
  }
74242
- const fd = fs20.openSync(this.filename, "r");
74242
+ const fd = fs21.openSync(this.filename, "r");
74243
74243
  let currentReadPosition = size;
74244
74244
  const chunkSizeBytes = Math.min(1024, size);
74245
74245
  const lineBytes = [];
@@ -74250,7 +74250,7 @@ var require_tail = __commonJS({
74250
74250
  return 0;
74251
74251
  }
74252
74252
  const buffer = Buffer.alloc(chunkSizeBytes);
74253
- const bytesRead = fs20.readSync(
74253
+ const bytesRead = fs21.readSync(
74254
74254
  fd,
74255
74255
  buffer,
74256
74256
  0,
@@ -74270,12 +74270,12 @@ var require_tail = __commonJS({
74270
74270
  index = this.getIndexOfLastLine(remaining);
74271
74271
  }
74272
74272
  }
74273
- fs20.closeSync(fd);
74273
+ fs21.closeSync(fd);
74274
74274
  return size - lineBytes.reduce((acc, cur) => acc + cur, 0);
74275
74275
  }
74276
74276
  latestPosition() {
74277
74277
  try {
74278
- return fs20.statSync(this.filename).size;
74278
+ return fs21.statSync(this.filename).size;
74279
74279
  } catch (err) {
74280
74280
  this.logger.error(`size check for ${this.filename} failed: ${err}`);
74281
74281
  this.emit("error", `size check for ${this.filename} failed: ${err}`);
@@ -74286,7 +74286,7 @@ var require_tail = __commonJS({
74286
74286
  if (this.queue.length >= 1) {
74287
74287
  const block = this.queue[0];
74288
74288
  if (block.end > block.start) {
74289
- let stream = fs20.createReadStream(this.filename, { start: block.start, end: block.end - 1, encoding: this.encoding });
74289
+ let stream = fs21.createReadStream(this.filename, { start: block.start, end: block.end - 1, encoding: this.encoding });
74290
74290
  stream.on("error", (error49) => {
74291
74291
  this.logger.error(`Tail error: ${error49}`);
74292
74292
  this.emit("error", error49);
@@ -74330,19 +74330,19 @@ var require_tail = __commonJS({
74330
74330
  }
74331
74331
  watch(startingCursor, flush) {
74332
74332
  if (this.isWatching) return;
74333
- this.logger.info(`filesystem.watch present? ${fs20.watch != void 0}`);
74333
+ this.logger.info(`filesystem.watch present? ${fs21.watch != void 0}`);
74334
74334
  this.logger.info(`useWatchFile: ${this.useWatchFile}`);
74335
74335
  this.isWatching = true;
74336
74336
  this.currentCursorPos = startingCursor;
74337
74337
  if (flush) this.change();
74338
- if (!this.useWatchFile && fs20.watch) {
74338
+ if (!this.useWatchFile && fs21.watch) {
74339
74339
  this.logger.info(`watch strategy: watch`);
74340
- this.watcher = fs20.watch(this.filename, this.fsWatchOptions, (e, filename) => {
74340
+ this.watcher = fs21.watch(this.filename, this.fsWatchOptions, (e, filename) => {
74341
74341
  this.watchEvent(e, filename);
74342
74342
  });
74343
74343
  } else {
74344
74344
  this.logger.info(`watch strategy: watchFile`);
74345
- fs20.watchFile(this.filename, this.fsWatchOptions, (curr, prev) => {
74345
+ fs21.watchFile(this.filename, this.fsWatchOptions, (curr, prev) => {
74346
74346
  this.watchFileEvent(curr, prev);
74347
74347
  });
74348
74348
  }
@@ -74351,7 +74351,7 @@ var require_tail = __commonJS({
74351
74351
  if (filename === void 0 || filename !== this.filename) {
74352
74352
  this.unwatch();
74353
74353
  if (this.follow) {
74354
- this.filename = path16.join(this.absPath, filename);
74354
+ this.filename = path17.join(this.absPath, filename);
74355
74355
  this.rewatchId = setTimeout((() => {
74356
74356
  try {
74357
74357
  this.watch(this.currentCursorPos);
@@ -74392,7 +74392,7 @@ var require_tail = __commonJS({
74392
74392
  if (this.watcher) {
74393
74393
  this.watcher.close();
74394
74394
  } else {
74395
- fs20.unwatchFile(this.filename);
74395
+ fs21.unwatchFile(this.filename);
74396
74396
  }
74397
74397
  if (this.rewatchId) {
74398
74398
  clearTimeout(this.rewatchId);
@@ -74480,9 +74480,9 @@ var require_package2 = __commonJS({
74480
74480
  // node_modules/dotenv/lib/main.js
74481
74481
  var require_main = __commonJS({
74482
74482
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
74483
- var fs20 = require("fs");
74484
- var path16 = require("path");
74485
- var os8 = require("os");
74483
+ var fs21 = require("fs");
74484
+ var path17 = require("path");
74485
+ var os9 = require("os");
74486
74486
  var crypto2 = require("crypto");
74487
74487
  var packageJson = require_package2();
74488
74488
  var version4 = packageJson.version;
@@ -74589,7 +74589,7 @@ var require_main = __commonJS({
74589
74589
  if (options && options.path && options.path.length > 0) {
74590
74590
  if (Array.isArray(options.path)) {
74591
74591
  for (const filepath of options.path) {
74592
- if (fs20.existsSync(filepath)) {
74592
+ if (fs21.existsSync(filepath)) {
74593
74593
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
74594
74594
  }
74595
74595
  }
@@ -74597,15 +74597,15 @@ var require_main = __commonJS({
74597
74597
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
74598
74598
  }
74599
74599
  } else {
74600
- possibleVaultPath = path16.resolve(process.cwd(), ".env.vault");
74600
+ possibleVaultPath = path17.resolve(process.cwd(), ".env.vault");
74601
74601
  }
74602
- if (fs20.existsSync(possibleVaultPath)) {
74602
+ if (fs21.existsSync(possibleVaultPath)) {
74603
74603
  return possibleVaultPath;
74604
74604
  }
74605
74605
  return null;
74606
74606
  }
74607
74607
  function _resolveHome(envPath) {
74608
- return envPath[0] === "~" ? path16.join(os8.homedir(), envPath.slice(1)) : envPath;
74608
+ return envPath[0] === "~" ? path17.join(os9.homedir(), envPath.slice(1)) : envPath;
74609
74609
  }
74610
74610
  function _configVault(options) {
74611
74611
  const debug = Boolean(options && options.debug);
@@ -74622,7 +74622,7 @@ var require_main = __commonJS({
74622
74622
  return { parsed };
74623
74623
  }
74624
74624
  function configDotenv(options) {
74625
- const dotenvPath = path16.resolve(process.cwd(), ".env");
74625
+ const dotenvPath = path17.resolve(process.cwd(), ".env");
74626
74626
  let encoding = "utf8";
74627
74627
  const debug = Boolean(options && options.debug);
74628
74628
  const quiet = options && "quiet" in options ? options.quiet : true;
@@ -74646,13 +74646,13 @@ var require_main = __commonJS({
74646
74646
  }
74647
74647
  let lastError;
74648
74648
  const parsedAll = {};
74649
- for (const path17 of optionPaths) {
74649
+ for (const path18 of optionPaths) {
74650
74650
  try {
74651
- const parsed = DotenvModule.parse(fs20.readFileSync(path17, { encoding }));
74651
+ const parsed = DotenvModule.parse(fs21.readFileSync(path18, { encoding }));
74652
74652
  DotenvModule.populate(parsedAll, parsed, options);
74653
74653
  } catch (e) {
74654
74654
  if (debug) {
74655
- _debug(`Failed to load ${path17} ${e.message}`);
74655
+ _debug(`Failed to load ${path18} ${e.message}`);
74656
74656
  }
74657
74657
  lastError = e;
74658
74658
  }
@@ -74667,7 +74667,7 @@ var require_main = __commonJS({
74667
74667
  const shortPaths = [];
74668
74668
  for (const filePath of optionPaths) {
74669
74669
  try {
74670
- const relative = path16.relative(process.cwd(), filePath);
74670
+ const relative = path17.relative(process.cwd(), filePath);
74671
74671
  shortPaths.push(relative);
74672
74672
  } catch (e) {
74673
74673
  if (debug) {
@@ -74771,7 +74771,7 @@ var require_main = __commonJS({
74771
74771
  var require_constants6 = __commonJS({
74772
74772
  "node_modules/readdirp/node_modules/picomatch/lib/constants.js"(exports2, module2) {
74773
74773
  "use strict";
74774
- var path16 = require("path");
74774
+ var path17 = require("path");
74775
74775
  var WIN_SLASH = "\\\\/";
74776
74776
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
74777
74777
  var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -74945,7 +74945,7 @@ var require_constants6 = __commonJS({
74945
74945
  /* | */
74946
74946
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
74947
74947
  /* \uFEFF */
74948
- SEP: path16.sep,
74948
+ SEP: path17.sep,
74949
74949
  /**
74950
74950
  * Create EXTGLOB_CHARS
74951
74951
  */
@@ -74972,7 +74972,7 @@ var require_constants6 = __commonJS({
74972
74972
  var require_utils6 = __commonJS({
74973
74973
  "node_modules/readdirp/node_modules/picomatch/lib/utils.js"(exports2) {
74974
74974
  "use strict";
74975
- var path16 = require("path");
74975
+ var path17 = require("path");
74976
74976
  var win32 = process.platform === "win32";
74977
74977
  var {
74978
74978
  REGEX_BACKSLASH,
@@ -75001,7 +75001,7 @@ var require_utils6 = __commonJS({
75001
75001
  if (options && typeof options.windows === "boolean") {
75002
75002
  return options.windows;
75003
75003
  }
75004
- return win32 === true || path16.sep === "\\";
75004
+ return win32 === true || path17.sep === "\\";
75005
75005
  };
75006
75006
  exports2.escapeLast = (input, char, lastIdx) => {
75007
75007
  const idx = input.lastIndexOf(char, lastIdx);
@@ -76365,7 +76365,7 @@ var require_parse3 = __commonJS({
76365
76365
  var require_picomatch = __commonJS({
76366
76366
  "node_modules/readdirp/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
76367
76367
  "use strict";
76368
- var path16 = require("path");
76368
+ var path17 = require("path");
76369
76369
  var scan = require_scan2();
76370
76370
  var parse4 = require_parse3();
76371
76371
  var utils = require_utils6();
@@ -76450,7 +76450,7 @@ var require_picomatch = __commonJS({
76450
76450
  };
76451
76451
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
76452
76452
  const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
76453
- return regex2.test(path16.basename(input));
76453
+ return regex2.test(path17.basename(input));
76454
76454
  };
76455
76455
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
76456
76456
  picomatch.parse = (pattern, options) => {
@@ -76514,15 +76514,15 @@ var require_picomatch2 = __commonJS({
76514
76514
  var require_readdirp = __commonJS({
76515
76515
  "node_modules/readdirp/index.js"(exports2, module2) {
76516
76516
  "use strict";
76517
- var fs20 = require("fs");
76517
+ var fs21 = require("fs");
76518
76518
  var { Readable } = require("stream");
76519
76519
  var sysPath = require("path");
76520
76520
  var { promisify } = require("util");
76521
76521
  var picomatch = require_picomatch2();
76522
- var readdir = promisify(fs20.readdir);
76523
- var stat = promisify(fs20.stat);
76524
- var lstat = promisify(fs20.lstat);
76525
- var realpath = promisify(fs20.realpath);
76522
+ var readdir = promisify(fs21.readdir);
76523
+ var stat = promisify(fs21.stat);
76524
+ var lstat = promisify(fs21.lstat);
76525
+ var realpath = promisify(fs21.realpath);
76526
76526
  var BANG = "!";
76527
76527
  var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
76528
76528
  var NORMAL_FLOW_ERRORS = /* @__PURE__ */ new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
@@ -76566,8 +76566,8 @@ var require_readdirp = __commonJS({
76566
76566
  return {
76567
76567
  root: ".",
76568
76568
  /* eslint-disable no-unused-vars */
76569
- fileFilter: (path16) => true,
76570
- directoryFilter: (path16) => true,
76569
+ fileFilter: (path17) => true,
76570
+ directoryFilter: (path17) => true,
76571
76571
  /* eslint-enable no-unused-vars */
76572
76572
  type: FILE_TYPE,
76573
76573
  lstat: false,
@@ -76587,7 +76587,7 @@ var require_readdirp = __commonJS({
76587
76587
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
76588
76588
  const statMethod = opts.lstat ? lstat : stat;
76589
76589
  if (wantBigintFsStats) {
76590
- this._stat = (path16) => statMethod(path16, { bigint: true });
76590
+ this._stat = (path17) => statMethod(path17, { bigint: true });
76591
76591
  } else {
76592
76592
  this._stat = statMethod;
76593
76593
  }
@@ -76596,7 +76596,7 @@ var require_readdirp = __commonJS({
76596
76596
  this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);
76597
76597
  this._wantsEverything = type === EVERYTHING_TYPE;
76598
76598
  this._root = sysPath.resolve(root);
76599
- this._isDirent = "Dirent" in fs20 && !opts.alwaysStat;
76599
+ this._isDirent = "Dirent" in fs21 && !opts.alwaysStat;
76600
76600
  this._statsProp = this._isDirent ? "dirent" : "stats";
76601
76601
  this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
76602
76602
  this.parents = [this._exploreDir(root, 1)];
@@ -76608,9 +76608,9 @@ var require_readdirp = __commonJS({
76608
76608
  this.reading = true;
76609
76609
  try {
76610
76610
  while (!this.destroyed && batch > 0) {
76611
- const { path: path16, depth, files = [] } = this.parent || {};
76611
+ const { path: path17, depth, files = [] } = this.parent || {};
76612
76612
  if (files.length > 0) {
76613
- const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path16));
76613
+ const slice = files.splice(0, batch).map((dirent) => this._formatEntry(dirent, path17));
76614
76614
  for (const entry of await Promise.all(slice)) {
76615
76615
  if (this.destroyed) return;
76616
76616
  const entryType = await this._getEntryType(entry);
@@ -76645,20 +76645,20 @@ var require_readdirp = __commonJS({
76645
76645
  this.reading = false;
76646
76646
  }
76647
76647
  }
76648
- async _exploreDir(path16, depth) {
76648
+ async _exploreDir(path17, depth) {
76649
76649
  let files;
76650
76650
  try {
76651
- files = await readdir(path16, this._rdOptions);
76651
+ files = await readdir(path17, this._rdOptions);
76652
76652
  } catch (error49) {
76653
76653
  this._onError(error49);
76654
76654
  }
76655
- return { files, depth, path: path16 };
76655
+ return { files, depth, path: path17 };
76656
76656
  }
76657
- async _formatEntry(dirent, path16) {
76657
+ async _formatEntry(dirent, path17) {
76658
76658
  let entry;
76659
76659
  try {
76660
76660
  const basename = this._isDirent ? dirent.name : dirent;
76661
- const fullPath = sysPath.resolve(sysPath.join(path16, basename));
76661
+ const fullPath = sysPath.resolve(sysPath.join(path17, basename));
76662
76662
  entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };
76663
76663
  entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
76664
76664
  } catch (err) {
@@ -76744,7 +76744,7 @@ var require_readdirp = __commonJS({
76744
76744
  var require_constants7 = __commonJS({
76745
76745
  "node_modules/anymatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
76746
76746
  "use strict";
76747
- var path16 = require("path");
76747
+ var path17 = require("path");
76748
76748
  var WIN_SLASH = "\\\\/";
76749
76749
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
76750
76750
  var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -76918,7 +76918,7 @@ var require_constants7 = __commonJS({
76918
76918
  /* | */
76919
76919
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
76920
76920
  /* \uFEFF */
76921
- SEP: path16.sep,
76921
+ SEP: path17.sep,
76922
76922
  /**
76923
76923
  * Create EXTGLOB_CHARS
76924
76924
  */
@@ -76945,7 +76945,7 @@ var require_constants7 = __commonJS({
76945
76945
  var require_utils7 = __commonJS({
76946
76946
  "node_modules/anymatch/node_modules/picomatch/lib/utils.js"(exports2) {
76947
76947
  "use strict";
76948
- var path16 = require("path");
76948
+ var path17 = require("path");
76949
76949
  var win32 = process.platform === "win32";
76950
76950
  var {
76951
76951
  REGEX_BACKSLASH,
@@ -76974,7 +76974,7 @@ var require_utils7 = __commonJS({
76974
76974
  if (options && typeof options.windows === "boolean") {
76975
76975
  return options.windows;
76976
76976
  }
76977
- return win32 === true || path16.sep === "\\";
76977
+ return win32 === true || path17.sep === "\\";
76978
76978
  };
76979
76979
  exports2.escapeLast = (input, char, lastIdx) => {
76980
76980
  const idx = input.lastIndexOf(char, lastIdx);
@@ -78338,7 +78338,7 @@ var require_parse4 = __commonJS({
78338
78338
  var require_picomatch3 = __commonJS({
78339
78339
  "node_modules/anymatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
78340
78340
  "use strict";
78341
- var path16 = require("path");
78341
+ var path17 = require("path");
78342
78342
  var scan = require_scan3();
78343
78343
  var parse4 = require_parse4();
78344
78344
  var utils = require_utils7();
@@ -78423,7 +78423,7 @@ var require_picomatch3 = __commonJS({
78423
78423
  };
78424
78424
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
78425
78425
  const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
78426
- return regex2.test(path16.basename(input));
78426
+ return regex2.test(path17.basename(input));
78427
78427
  };
78428
78428
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
78429
78429
  picomatch.parse = (pattern, options) => {
@@ -78486,22 +78486,22 @@ var require_picomatch4 = __commonJS({
78486
78486
  // node_modules/normalize-path/index.js
78487
78487
  var require_normalize_path = __commonJS({
78488
78488
  "node_modules/normalize-path/index.js"(exports2, module2) {
78489
- module2.exports = function(path16, stripTrailing) {
78490
- if (typeof path16 !== "string") {
78489
+ module2.exports = function(path17, stripTrailing) {
78490
+ if (typeof path17 !== "string") {
78491
78491
  throw new TypeError("expected path to be a string");
78492
78492
  }
78493
- if (path16 === "\\" || path16 === "/") return "/";
78494
- var len = path16.length;
78495
- if (len <= 1) return path16;
78493
+ if (path17 === "\\" || path17 === "/") return "/";
78494
+ var len = path17.length;
78495
+ if (len <= 1) return path17;
78496
78496
  var prefix = "";
78497
- if (len > 4 && path16[3] === "\\") {
78498
- var ch = path16[2];
78499
- if ((ch === "?" || ch === ".") && path16.slice(0, 2) === "\\\\") {
78500
- path16 = path16.slice(2);
78497
+ if (len > 4 && path17[3] === "\\") {
78498
+ var ch = path17[2];
78499
+ if ((ch === "?" || ch === ".") && path17.slice(0, 2) === "\\\\") {
78500
+ path17 = path17.slice(2);
78501
78501
  prefix = "//";
78502
78502
  }
78503
78503
  }
78504
- var segs = path16.split(/[/\\]+/);
78504
+ var segs = path17.split(/[/\\]+/);
78505
78505
  if (stripTrailing !== false && segs[segs.length - 1] === "") {
78506
78506
  segs.pop();
78507
78507
  }
@@ -78539,17 +78539,17 @@ var require_anymatch = __commonJS({
78539
78539
  if (!isList && typeof _path2 !== "string") {
78540
78540
  throw new TypeError("anymatch: second argument must be a string: got " + Object.prototype.toString.call(_path2));
78541
78541
  }
78542
- const path16 = normalizePath(_path2, false);
78542
+ const path17 = normalizePath(_path2, false);
78543
78543
  for (let index = 0; index < negPatterns.length; index++) {
78544
78544
  const nglob = negPatterns[index];
78545
- if (nglob(path16)) {
78545
+ if (nglob(path17)) {
78546
78546
  return returnIndex ? -1 : false;
78547
78547
  }
78548
78548
  }
78549
- const applied = isList && [path16].concat(args.slice(1));
78549
+ const applied = isList && [path17].concat(args.slice(1));
78550
78550
  for (let index = 0; index < patterns.length; index++) {
78551
78551
  const pattern = patterns[index];
78552
- if (isList ? pattern(...applied) : pattern(path16)) {
78552
+ if (isList ? pattern(...applied) : pattern(path17)) {
78553
78553
  return returnIndex ? index : true;
78554
78554
  }
78555
78555
  }
@@ -80116,10 +80116,10 @@ var require_binary_extensions2 = __commonJS({
80116
80116
  var require_is_binary_path = __commonJS({
80117
80117
  "node_modules/is-binary-path/index.js"(exports2, module2) {
80118
80118
  "use strict";
80119
- var path16 = require("path");
80119
+ var path17 = require("path");
80120
80120
  var binaryExtensions = require_binary_extensions2();
80121
80121
  var extensions = new Set(binaryExtensions);
80122
- module2.exports = (filePath) => extensions.has(path16.extname(filePath).slice(1).toLowerCase());
80122
+ module2.exports = (filePath) => extensions.has(path17.extname(filePath).slice(1).toLowerCase());
80123
80123
  }
80124
80124
  });
80125
80125
 
@@ -80129,7 +80129,7 @@ var require_constants9 = __commonJS({
80129
80129
  "use strict";
80130
80130
  var { sep } = require("path");
80131
80131
  var { platform } = process;
80132
- var os8 = require("os");
80132
+ var os9 = require("os");
80133
80133
  exports2.EV_ALL = "all";
80134
80134
  exports2.EV_READY = "ready";
80135
80135
  exports2.EV_ADD = "add";
@@ -80183,7 +80183,7 @@ var require_constants9 = __commonJS({
80183
80183
  exports2.isWindows = platform === "win32";
80184
80184
  exports2.isMacos = platform === "darwin";
80185
80185
  exports2.isLinux = platform === "linux";
80186
- exports2.isIBMi = os8.type() === "OS400";
80186
+ exports2.isIBMi = os9.type() === "OS400";
80187
80187
  }
80188
80188
  });
80189
80189
 
@@ -80191,7 +80191,7 @@ var require_constants9 = __commonJS({
80191
80191
  var require_nodefs_handler = __commonJS({
80192
80192
  "node_modules/chokidar/lib/nodefs-handler.js"(exports2, module2) {
80193
80193
  "use strict";
80194
- var fs20 = require("fs");
80194
+ var fs21 = require("fs");
80195
80195
  var sysPath = require("path");
80196
80196
  var { promisify } = require("util");
80197
80197
  var isBinaryPath = require_is_binary_path();
@@ -80214,11 +80214,11 @@ var require_nodefs_handler = __commonJS({
80214
80214
  STAR
80215
80215
  } = require_constants9();
80216
80216
  var THROTTLE_MODE_WATCH = "watch";
80217
- var open = promisify(fs20.open);
80218
- var stat = promisify(fs20.stat);
80219
- var lstat = promisify(fs20.lstat);
80220
- var close = promisify(fs20.close);
80221
- var fsrealpath = promisify(fs20.realpath);
80217
+ var open = promisify(fs21.open);
80218
+ var stat = promisify(fs21.stat);
80219
+ var lstat = promisify(fs21.lstat);
80220
+ var close = promisify(fs21.close);
80221
+ var fsrealpath = promisify(fs21.realpath);
80222
80222
  var statMethods = { lstat, stat };
80223
80223
  var foreach = (val, fn2) => {
80224
80224
  if (val instanceof Set) {
@@ -80252,20 +80252,20 @@ var require_nodefs_handler = __commonJS({
80252
80252
  };
80253
80253
  var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
80254
80254
  var FsWatchInstances = /* @__PURE__ */ new Map();
80255
- function createFsWatchInstance(path16, options, listener, errHandler, emitRaw) {
80255
+ function createFsWatchInstance(path17, options, listener, errHandler, emitRaw) {
80256
80256
  const handleEvent = (rawEvent, evPath) => {
80257
- listener(path16);
80258
- emitRaw(rawEvent, evPath, { watchedPath: path16 });
80259
- if (evPath && path16 !== evPath) {
80257
+ listener(path17);
80258
+ emitRaw(rawEvent, evPath, { watchedPath: path17 });
80259
+ if (evPath && path17 !== evPath) {
80260
80260
  fsWatchBroadcast(
80261
- sysPath.resolve(path16, evPath),
80261
+ sysPath.resolve(path17, evPath),
80262
80262
  KEY_LISTENERS,
80263
- sysPath.join(path16, evPath)
80263
+ sysPath.join(path17, evPath)
80264
80264
  );
80265
80265
  }
80266
80266
  };
80267
80267
  try {
80268
- return fs20.watch(path16, options, handleEvent);
80268
+ return fs21.watch(path17, options, handleEvent);
80269
80269
  } catch (error49) {
80270
80270
  errHandler(error49);
80271
80271
  }
@@ -80277,13 +80277,13 @@ var require_nodefs_handler = __commonJS({
80277
80277
  listener(val1, val2, val3);
80278
80278
  });
80279
80279
  };
80280
- var setFsWatchListener = (path16, fullPath, options, handlers) => {
80280
+ var setFsWatchListener = (path17, fullPath, options, handlers) => {
80281
80281
  const { listener, errHandler, rawEmitter } = handlers;
80282
80282
  let cont = FsWatchInstances.get(fullPath);
80283
80283
  let watcher;
80284
80284
  if (!options.persistent) {
80285
80285
  watcher = createFsWatchInstance(
80286
- path16,
80286
+ path17,
80287
80287
  options,
80288
80288
  listener,
80289
80289
  errHandler,
@@ -80297,7 +80297,7 @@ var require_nodefs_handler = __commonJS({
80297
80297
  addAndConvert(cont, KEY_RAW, rawEmitter);
80298
80298
  } else {
80299
80299
  watcher = createFsWatchInstance(
80300
- path16,
80300
+ path17,
80301
80301
  options,
80302
80302
  fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
80303
80303
  errHandler,
@@ -80310,7 +80310,7 @@ var require_nodefs_handler = __commonJS({
80310
80310
  cont.watcherUnusable = true;
80311
80311
  if (isWindows && error49.code === "EPERM") {
80312
80312
  try {
80313
- const fd = await open(path16, "r");
80313
+ const fd = await open(path17, "r");
80314
80314
  await close(fd);
80315
80315
  broadcastErr(error49);
80316
80316
  } catch (err) {
@@ -80341,7 +80341,7 @@ var require_nodefs_handler = __commonJS({
80341
80341
  };
80342
80342
  };
80343
80343
  var FsWatchFileInstances = /* @__PURE__ */ new Map();
80344
- var setFsWatchFileListener = (path16, fullPath, options, handlers) => {
80344
+ var setFsWatchFileListener = (path17, fullPath, options, handlers) => {
80345
80345
  const { listener, rawEmitter } = handlers;
80346
80346
  let cont = FsWatchFileInstances.get(fullPath);
80347
80347
  let listeners = /* @__PURE__ */ new Set();
@@ -80350,7 +80350,7 @@ var require_nodefs_handler = __commonJS({
80350
80350
  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
80351
80351
  listeners = cont.listeners;
80352
80352
  rawEmitters = cont.rawEmitters;
80353
- fs20.unwatchFile(fullPath);
80353
+ fs21.unwatchFile(fullPath);
80354
80354
  cont = void 0;
80355
80355
  }
80356
80356
  if (cont) {
@@ -80361,13 +80361,13 @@ var require_nodefs_handler = __commonJS({
80361
80361
  listeners: listener,
80362
80362
  rawEmitters: rawEmitter,
80363
80363
  options,
80364
- watcher: fs20.watchFile(fullPath, options, (curr, prev) => {
80364
+ watcher: fs21.watchFile(fullPath, options, (curr, prev) => {
80365
80365
  foreach(cont.rawEmitters, (rawEmitter2) => {
80366
80366
  rawEmitter2(EV_CHANGE, fullPath, { curr, prev });
80367
80367
  });
80368
80368
  const currmtime = curr.mtimeMs;
80369
80369
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
80370
- foreach(cont.listeners, (listener2) => listener2(path16, curr));
80370
+ foreach(cont.listeners, (listener2) => listener2(path17, curr));
80371
80371
  }
80372
80372
  })
80373
80373
  };
@@ -80378,7 +80378,7 @@ var require_nodefs_handler = __commonJS({
80378
80378
  delFromSet(cont, KEY_RAW, rawEmitter);
80379
80379
  if (isEmptySet(cont.listeners)) {
80380
80380
  FsWatchFileInstances.delete(fullPath);
80381
- fs20.unwatchFile(fullPath);
80381
+ fs21.unwatchFile(fullPath);
80382
80382
  cont.options = cont.watcher = void 0;
80383
80383
  Object.freeze(cont);
80384
80384
  }
@@ -80398,24 +80398,24 @@ var require_nodefs_handler = __commonJS({
80398
80398
  * @param {Function} listener on fs change
80399
80399
  * @returns {Function} closer for the watcher instance
80400
80400
  */
80401
- _watchWithNodeFs(path16, listener) {
80401
+ _watchWithNodeFs(path17, listener) {
80402
80402
  const opts = this.fsw.options;
80403
- const directory = sysPath.dirname(path16);
80404
- const basename = sysPath.basename(path16);
80403
+ const directory = sysPath.dirname(path17);
80404
+ const basename = sysPath.basename(path17);
80405
80405
  const parent = this.fsw._getWatchedDir(directory);
80406
80406
  parent.add(basename);
80407
- const absolutePath = sysPath.resolve(path16);
80407
+ const absolutePath = sysPath.resolve(path17);
80408
80408
  const options = { persistent: opts.persistent };
80409
80409
  if (!listener) listener = EMPTY_FN;
80410
80410
  let closer;
80411
80411
  if (opts.usePolling) {
80412
80412
  options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? opts.binaryInterval : opts.interval;
80413
- closer = setFsWatchFileListener(path16, absolutePath, options, {
80413
+ closer = setFsWatchFileListener(path17, absolutePath, options, {
80414
80414
  listener,
80415
80415
  rawEmitter: this.fsw._emitRaw
80416
80416
  });
80417
80417
  } else {
80418
- closer = setFsWatchListener(path16, absolutePath, options, {
80418
+ closer = setFsWatchListener(path17, absolutePath, options, {
80419
80419
  listener,
80420
80420
  errHandler: this._boundHandleError,
80421
80421
  rawEmitter: this.fsw._emitRaw
@@ -80439,7 +80439,7 @@ var require_nodefs_handler = __commonJS({
80439
80439
  const parent = this.fsw._getWatchedDir(dirname2);
80440
80440
  let prevStats = stats;
80441
80441
  if (parent.has(basename)) return;
80442
- const listener = async (path16, newStats) => {
80442
+ const listener = async (path17, newStats) => {
80443
80443
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5)) return;
80444
80444
  if (!newStats || newStats.mtimeMs === 0) {
80445
80445
  try {
@@ -80451,9 +80451,9 @@ var require_nodefs_handler = __commonJS({
80451
80451
  this.fsw._emit(EV_CHANGE, file2, newStats2);
80452
80452
  }
80453
80453
  if (isLinux && prevStats.ino !== newStats2.ino) {
80454
- this.fsw._closeFile(path16);
80454
+ this.fsw._closeFile(path17);
80455
80455
  prevStats = newStats2;
80456
- this.fsw._addPathCloser(path16, this._watchWithNodeFs(file2, listener));
80456
+ this.fsw._addPathCloser(path17, this._watchWithNodeFs(file2, listener));
80457
80457
  } else {
80458
80458
  prevStats = newStats2;
80459
80459
  }
@@ -80484,7 +80484,7 @@ var require_nodefs_handler = __commonJS({
80484
80484
  * @param {String} item basename of this item
80485
80485
  * @returns {Promise<Boolean>} true if no more processing is needed for this entry.
80486
80486
  */
80487
- async _handleSymlink(entry, directory, path16, item) {
80487
+ async _handleSymlink(entry, directory, path17, item) {
80488
80488
  if (this.fsw.closed) {
80489
80489
  return;
80490
80490
  }
@@ -80494,7 +80494,7 @@ var require_nodefs_handler = __commonJS({
80494
80494
  this.fsw._incrReadyCount();
80495
80495
  let linkPath;
80496
80496
  try {
80497
- linkPath = await fsrealpath(path16);
80497
+ linkPath = await fsrealpath(path17);
80498
80498
  } catch (e) {
80499
80499
  this.fsw._emitReady();
80500
80500
  return true;
@@ -80503,12 +80503,12 @@ var require_nodefs_handler = __commonJS({
80503
80503
  if (dir.has(item)) {
80504
80504
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
80505
80505
  this.fsw._symlinkPaths.set(full, linkPath);
80506
- this.fsw._emit(EV_CHANGE, path16, entry.stats);
80506
+ this.fsw._emit(EV_CHANGE, path17, entry.stats);
80507
80507
  }
80508
80508
  } else {
80509
80509
  dir.add(item);
80510
80510
  this.fsw._symlinkPaths.set(full, linkPath);
80511
- this.fsw._emit(EV_ADD, path16, entry.stats);
80511
+ this.fsw._emit(EV_ADD, path17, entry.stats);
80512
80512
  }
80513
80513
  this.fsw._emitReady();
80514
80514
  return true;
@@ -80536,9 +80536,9 @@ var require_nodefs_handler = __commonJS({
80536
80536
  return;
80537
80537
  }
80538
80538
  const item = entry.path;
80539
- let path16 = sysPath.join(directory, item);
80539
+ let path17 = sysPath.join(directory, item);
80540
80540
  current.add(item);
80541
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path16, item)) {
80541
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path17, item)) {
80542
80542
  return;
80543
80543
  }
80544
80544
  if (this.fsw.closed) {
@@ -80547,8 +80547,8 @@ var require_nodefs_handler = __commonJS({
80547
80547
  }
80548
80548
  if (item === target || !target && !previous.has(item)) {
80549
80549
  this.fsw._incrReadyCount();
80550
- path16 = sysPath.join(dir, sysPath.relative(dir, path16));
80551
- this._addToNodeFs(path16, initialAdd, wh, depth + 1);
80550
+ path17 = sysPath.join(dir, sysPath.relative(dir, path17));
80551
+ this._addToNodeFs(path17, initialAdd, wh, depth + 1);
80552
80552
  }
80553
80553
  }).on(EV_ERROR, this._boundHandleError);
80554
80554
  return new Promise(
@@ -80618,13 +80618,13 @@ var require_nodefs_handler = __commonJS({
80618
80618
  * @param {String=} target Child path actually targeted for watch
80619
80619
  * @returns {Promise}
80620
80620
  */
80621
- async _addToNodeFs(path16, initialAdd, priorWh, depth, target) {
80621
+ async _addToNodeFs(path17, initialAdd, priorWh, depth, target) {
80622
80622
  const ready = this.fsw._emitReady;
80623
- if (this.fsw._isIgnored(path16) || this.fsw.closed) {
80623
+ if (this.fsw._isIgnored(path17) || this.fsw.closed) {
80624
80624
  ready();
80625
80625
  return false;
80626
80626
  }
80627
- const wh = this.fsw._getWatchHelpers(path16, depth);
80627
+ const wh = this.fsw._getWatchHelpers(path17, depth);
80628
80628
  if (!wh.hasGlob && priorWh) {
80629
80629
  wh.hasGlob = priorWh.hasGlob;
80630
80630
  wh.globFilter = priorWh.globFilter;
@@ -80638,11 +80638,11 @@ var require_nodefs_handler = __commonJS({
80638
80638
  ready();
80639
80639
  return false;
80640
80640
  }
80641
- const follow = this.fsw.options.followSymlinks && !path16.includes(STAR) && !path16.includes(BRACE_START);
80641
+ const follow = this.fsw.options.followSymlinks && !path17.includes(STAR) && !path17.includes(BRACE_START);
80642
80642
  let closer;
80643
80643
  if (stats.isDirectory()) {
80644
- const absPath = sysPath.resolve(path16);
80645
- const targetPath = follow ? await fsrealpath(path16) : path16;
80644
+ const absPath = sysPath.resolve(path17);
80645
+ const targetPath = follow ? await fsrealpath(path17) : path17;
80646
80646
  if (this.fsw.closed) return;
80647
80647
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
80648
80648
  if (this.fsw.closed) return;
@@ -80650,26 +80650,26 @@ var require_nodefs_handler = __commonJS({
80650
80650
  this.fsw._symlinkPaths.set(absPath, targetPath);
80651
80651
  }
80652
80652
  } else if (stats.isSymbolicLink()) {
80653
- const targetPath = follow ? await fsrealpath(path16) : path16;
80653
+ const targetPath = follow ? await fsrealpath(path17) : path17;
80654
80654
  if (this.fsw.closed) return;
80655
80655
  const parent = sysPath.dirname(wh.watchPath);
80656
80656
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
80657
80657
  this.fsw._emit(EV_ADD, wh.watchPath, stats);
80658
- closer = await this._handleDir(parent, stats, initialAdd, depth, path16, wh, targetPath);
80658
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path17, wh, targetPath);
80659
80659
  if (this.fsw.closed) return;
80660
80660
  if (targetPath !== void 0) {
80661
- this.fsw._symlinkPaths.set(sysPath.resolve(path16), targetPath);
80661
+ this.fsw._symlinkPaths.set(sysPath.resolve(path17), targetPath);
80662
80662
  }
80663
80663
  } else {
80664
80664
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
80665
80665
  }
80666
80666
  ready();
80667
- this.fsw._addPathCloser(path16, closer);
80667
+ this.fsw._addPathCloser(path17, closer);
80668
80668
  return false;
80669
80669
  } catch (error49) {
80670
80670
  if (this.fsw._handleError(error49)) {
80671
80671
  ready();
80672
- return path16;
80672
+ return path17;
80673
80673
  }
80674
80674
  }
80675
80675
  }
@@ -80682,7 +80682,7 @@ var require_nodefs_handler = __commonJS({
80682
80682
  var require_fsevents_handler = __commonJS({
80683
80683
  "node_modules/chokidar/lib/fsevents-handler.js"(exports2, module2) {
80684
80684
  "use strict";
80685
- var fs20 = require("fs");
80685
+ var fs21 = require("fs");
80686
80686
  var sysPath = require("path");
80687
80687
  var { promisify } = require("util");
80688
80688
  var fsevents;
@@ -80727,9 +80727,9 @@ var require_fsevents_handler = __commonJS({
80727
80727
  IDENTITY_FN
80728
80728
  } = require_constants9();
80729
80729
  var Depth = (value) => isNaN(value) ? {} : { depth: value };
80730
- var stat = promisify(fs20.stat);
80731
- var lstat = promisify(fs20.lstat);
80732
- var realpath = promisify(fs20.realpath);
80730
+ var stat = promisify(fs21.stat);
80731
+ var lstat = promisify(fs21.lstat);
80732
+ var realpath = promisify(fs21.realpath);
80733
80733
  var statMethods = { stat, lstat };
80734
80734
  var FSEventsWatchers = /* @__PURE__ */ new Map();
80735
80735
  var consolidateThreshhold = 10;
@@ -80743,18 +80743,18 @@ var require_fsevents_handler = __commonJS({
80743
80743
  131840,
80744
80744
  262912
80745
80745
  ]);
80746
- var createFSEventsInstance = (path16, callback) => {
80747
- const stop = fsevents.watch(path16, callback);
80746
+ var createFSEventsInstance = (path17, callback) => {
80747
+ const stop = fsevents.watch(path17, callback);
80748
80748
  return { stop };
80749
80749
  };
80750
- function setFSEventsListener(path16, realPath, listener, rawEmitter) {
80750
+ function setFSEventsListener(path17, realPath, listener, rawEmitter) {
80751
80751
  let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
80752
80752
  const parentPath = sysPath.dirname(watchPath);
80753
80753
  let cont = FSEventsWatchers.get(watchPath);
80754
80754
  if (couldConsolidate(parentPath)) {
80755
80755
  watchPath = parentPath;
80756
80756
  }
80757
- const resolvedPath = sysPath.resolve(path16);
80757
+ const resolvedPath = sysPath.resolve(path17);
80758
80758
  const hasSymlink = resolvedPath !== realPath;
80759
80759
  const filteredListener = (fullPath, flags, info) => {
80760
80760
  if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
@@ -80799,10 +80799,10 @@ var require_fsevents_handler = __commonJS({
80799
80799
  }
80800
80800
  };
80801
80801
  }
80802
- var couldConsolidate = (path16) => {
80802
+ var couldConsolidate = (path17) => {
80803
80803
  let count = 0;
80804
80804
  for (const watchPath of FSEventsWatchers.keys()) {
80805
- if (watchPath.indexOf(path16) === 0) {
80805
+ if (watchPath.indexOf(path17) === 0) {
80806
80806
  count++;
80807
80807
  if (count >= consolidateThreshhold) {
80808
80808
  return true;
@@ -80812,9 +80812,9 @@ var require_fsevents_handler = __commonJS({
80812
80812
  return false;
80813
80813
  };
80814
80814
  var canUse = () => fsevents && FSEventsWatchers.size < 128;
80815
- var calcDepth = (path16, root) => {
80815
+ var calcDepth = (path17, root) => {
80816
80816
  let i = 0;
80817
- while (!path16.indexOf(root) && (path16 = sysPath.dirname(path16)) !== root) i++;
80817
+ while (!path17.indexOf(root) && (path17 = sysPath.dirname(path17)) !== root) i++;
80818
80818
  return i;
80819
80819
  };
80820
80820
  var sameTypes = (info, stats) => info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || info.type === FSEVENT_TYPE_FILE && stats.isFile();
@@ -80825,41 +80825,41 @@ var require_fsevents_handler = __commonJS({
80825
80825
  constructor(fsw) {
80826
80826
  this.fsw = fsw;
80827
80827
  }
80828
- checkIgnored(path16, stats) {
80828
+ checkIgnored(path17, stats) {
80829
80829
  const ipaths = this.fsw._ignoredPaths;
80830
- if (this.fsw._isIgnored(path16, stats)) {
80831
- ipaths.add(path16);
80830
+ if (this.fsw._isIgnored(path17, stats)) {
80831
+ ipaths.add(path17);
80832
80832
  if (stats && stats.isDirectory()) {
80833
- ipaths.add(path16 + ROOT_GLOBSTAR);
80833
+ ipaths.add(path17 + ROOT_GLOBSTAR);
80834
80834
  }
80835
80835
  return true;
80836
80836
  }
80837
- ipaths.delete(path16);
80838
- ipaths.delete(path16 + ROOT_GLOBSTAR);
80837
+ ipaths.delete(path17);
80838
+ ipaths.delete(path17 + ROOT_GLOBSTAR);
80839
80839
  }
80840
- addOrChange(path16, fullPath, realPath, parent, watchedDir, item, info, opts) {
80840
+ addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
80841
80841
  const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
80842
- this.handleEvent(event, path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80842
+ this.handleEvent(event, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80843
80843
  }
80844
- async checkExists(path16, fullPath, realPath, parent, watchedDir, item, info, opts) {
80844
+ async checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
80845
80845
  try {
80846
- const stats = await stat(path16);
80846
+ const stats = await stat(path17);
80847
80847
  if (this.fsw.closed) return;
80848
80848
  if (sameTypes(info, stats)) {
80849
- this.addOrChange(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80849
+ this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80850
80850
  } else {
80851
- this.handleEvent(EV_UNLINK, path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80851
+ this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80852
80852
  }
80853
80853
  } catch (error49) {
80854
80854
  if (error49.code === "EACCES") {
80855
- this.addOrChange(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80855
+ this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80856
80856
  } else {
80857
- this.handleEvent(EV_UNLINK, path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80857
+ this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80858
80858
  }
80859
80859
  }
80860
80860
  }
80861
- handleEvent(event, path16, fullPath, realPath, parent, watchedDir, item, info, opts) {
80862
- if (this.fsw.closed || this.checkIgnored(path16)) return;
80861
+ handleEvent(event, path17, fullPath, realPath, parent, watchedDir, item, info, opts) {
80862
+ if (this.fsw.closed || this.checkIgnored(path17)) return;
80863
80863
  if (event === EV_UNLINK) {
80864
80864
  const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY;
80865
80865
  if (isDirectory || watchedDir.has(item)) {
@@ -80867,16 +80867,16 @@ var require_fsevents_handler = __commonJS({
80867
80867
  }
80868
80868
  } else {
80869
80869
  if (event === EV_ADD) {
80870
- if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path16);
80870
+ if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path17);
80871
80871
  if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
80872
80872
  const curDepth = opts.depth === void 0 ? void 0 : calcDepth(fullPath, realPath) + 1;
80873
- return this._addToFsEvents(path16, false, true, curDepth);
80873
+ return this._addToFsEvents(path17, false, true, curDepth);
80874
80874
  }
80875
80875
  this.fsw._getWatchedDir(parent).add(item);
80876
80876
  }
80877
80877
  const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
80878
- this.fsw._emit(eventName, path16);
80879
- if (eventName === EV_ADD_DIR) this._addToFsEvents(path16, false, true);
80878
+ this.fsw._emit(eventName, path17);
80879
+ if (eventName === EV_ADD_DIR) this._addToFsEvents(path17, false, true);
80880
80880
  }
80881
80881
  }
80882
80882
  /**
@@ -80893,41 +80893,41 @@ var require_fsevents_handler = __commonJS({
80893
80893
  const watchCallback = async (fullPath, flags, info) => {
80894
80894
  if (this.fsw.closed) return;
80895
80895
  if (opts.depth !== void 0 && calcDepth(fullPath, realPath) > opts.depth) return;
80896
- const path16 = transform2(sysPath.join(
80896
+ const path17 = transform2(sysPath.join(
80897
80897
  watchPath,
80898
80898
  sysPath.relative(watchPath, fullPath)
80899
80899
  ));
80900
- if (globFilter && !globFilter(path16)) return;
80901
- const parent = sysPath.dirname(path16);
80902
- const item = sysPath.basename(path16);
80900
+ if (globFilter && !globFilter(path17)) return;
80901
+ const parent = sysPath.dirname(path17);
80902
+ const item = sysPath.basename(path17);
80903
80903
  const watchedDir = this.fsw._getWatchedDir(
80904
- info.type === FSEVENT_TYPE_DIRECTORY ? path16 : parent
80904
+ info.type === FSEVENT_TYPE_DIRECTORY ? path17 : parent
80905
80905
  );
80906
80906
  if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
80907
80907
  if (typeof opts.ignored === FUNCTION_TYPE) {
80908
80908
  let stats;
80909
80909
  try {
80910
- stats = await stat(path16);
80910
+ stats = await stat(path17);
80911
80911
  } catch (error49) {
80912
80912
  }
80913
80913
  if (this.fsw.closed) return;
80914
- if (this.checkIgnored(path16, stats)) return;
80914
+ if (this.checkIgnored(path17, stats)) return;
80915
80915
  if (sameTypes(info, stats)) {
80916
- this.addOrChange(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80916
+ this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80917
80917
  } else {
80918
- this.handleEvent(EV_UNLINK, path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80918
+ this.handleEvent(EV_UNLINK, path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80919
80919
  }
80920
80920
  } else {
80921
- this.checkExists(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80921
+ this.checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80922
80922
  }
80923
80923
  } else {
80924
80924
  switch (info.event) {
80925
80925
  case FSEVENT_CREATED:
80926
80926
  case FSEVENT_MODIFIED:
80927
- return this.addOrChange(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80927
+ return this.addOrChange(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80928
80928
  case FSEVENT_DELETED:
80929
80929
  case FSEVENT_MOVED:
80930
- return this.checkExists(path16, fullPath, realPath, parent, watchedDir, item, info, opts);
80930
+ return this.checkExists(path17, fullPath, realPath, parent, watchedDir, item, info, opts);
80931
80931
  }
80932
80932
  }
80933
80933
  };
@@ -80959,12 +80959,12 @@ var require_fsevents_handler = __commonJS({
80959
80959
  return this.fsw._emitReady();
80960
80960
  }
80961
80961
  this.fsw._incrReadyCount();
80962
- this._addToFsEvents(linkTarget || linkPath, (path16) => {
80962
+ this._addToFsEvents(linkTarget || linkPath, (path17) => {
80963
80963
  let aliasedPath = linkPath;
80964
80964
  if (linkTarget && linkTarget !== DOT_SLASH) {
80965
- aliasedPath = path16.replace(linkTarget, linkPath);
80966
- } else if (path16 !== DOT_SLASH) {
80967
- aliasedPath = sysPath.join(linkPath, path16);
80965
+ aliasedPath = path17.replace(linkTarget, linkPath);
80966
+ } else if (path17 !== DOT_SLASH) {
80967
+ aliasedPath = sysPath.join(linkPath, path17);
80968
80968
  }
80969
80969
  return transform2(aliasedPath);
80970
80970
  }, false, curDepth);
@@ -80991,7 +80991,7 @@ var require_fsevents_handler = __commonJS({
80991
80991
  this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
80992
80992
  }
80993
80993
  }
80994
- initWatch(realPath, path16, wh, processPath) {
80994
+ initWatch(realPath, path17, wh, processPath) {
80995
80995
  if (this.fsw.closed) return;
80996
80996
  const closer = this._watchWithFsEvents(
80997
80997
  wh.watchPath,
@@ -80999,7 +80999,7 @@ var require_fsevents_handler = __commonJS({
80999
80999
  processPath,
81000
81000
  wh.globFilter
81001
81001
  );
81002
- this.fsw._addPathCloser(path16, closer);
81002
+ this.fsw._addPathCloser(path17, closer);
81003
81003
  }
81004
81004
  /**
81005
81005
  * Handle added path with fsevents
@@ -81009,13 +81009,13 @@ var require_fsevents_handler = __commonJS({
81009
81009
  * @param {Number=} priorDepth Level of subdirectories already traversed.
81010
81010
  * @returns {Promise<void>}
81011
81011
  */
81012
- async _addToFsEvents(path16, transform2, forceAdd, priorDepth) {
81012
+ async _addToFsEvents(path17, transform2, forceAdd, priorDepth) {
81013
81013
  if (this.fsw.closed) {
81014
81014
  return;
81015
81015
  }
81016
81016
  const opts = this.fsw.options;
81017
81017
  const processPath = typeof transform2 === FUNCTION_TYPE ? transform2 : IDENTITY_FN;
81018
- const wh = this.fsw._getWatchHelpers(path16);
81018
+ const wh = this.fsw._getWatchHelpers(path17);
81019
81019
  try {
81020
81020
  const stats = await statMethods[wh.statMethod](wh.watchPath);
81021
81021
  if (this.fsw.closed) return;
@@ -81023,7 +81023,7 @@ var require_fsevents_handler = __commonJS({
81023
81023
  throw null;
81024
81024
  }
81025
81025
  if (stats.isDirectory()) {
81026
- if (!wh.globFilter) this.emitAdd(processPath(path16), stats, processPath, opts, forceAdd);
81026
+ if (!wh.globFilter) this.emitAdd(processPath(path17), stats, processPath, opts, forceAdd);
81027
81027
  if (priorDepth && priorDepth > opts.depth) return;
81028
81028
  this.fsw._readdirp(wh.watchPath, {
81029
81029
  fileFilter: (entry) => wh.filterPath(entry),
@@ -81057,14 +81057,14 @@ var require_fsevents_handler = __commonJS({
81057
81057
  }
81058
81058
  if (opts.persistent && forceAdd !== true) {
81059
81059
  if (typeof transform2 === FUNCTION_TYPE) {
81060
- this.initWatch(void 0, path16, wh, processPath);
81060
+ this.initWatch(void 0, path17, wh, processPath);
81061
81061
  } else {
81062
81062
  let realPath;
81063
81063
  try {
81064
81064
  realPath = await realpath(wh.watchPath);
81065
81065
  } catch (e) {
81066
81066
  }
81067
- this.initWatch(realPath, path16, wh, processPath);
81067
+ this.initWatch(realPath, path17, wh, processPath);
81068
81068
  }
81069
81069
  }
81070
81070
  }
@@ -81079,7 +81079,7 @@ var require_chokidar = __commonJS({
81079
81079
  "node_modules/chokidar/index.js"(exports2) {
81080
81080
  "use strict";
81081
81081
  var { EventEmitter: EventEmitter2 } = require("events");
81082
- var fs20 = require("fs");
81082
+ var fs21 = require("fs");
81083
81083
  var sysPath = require("path");
81084
81084
  var { promisify } = require("util");
81085
81085
  var readdirp = require_readdirp();
@@ -81124,8 +81124,8 @@ var require_chokidar = __commonJS({
81124
81124
  isMacos,
81125
81125
  isIBMi
81126
81126
  } = require_constants9();
81127
- var stat = promisify(fs20.stat);
81128
- var readdir = promisify(fs20.readdir);
81127
+ var stat = promisify(fs21.stat);
81128
+ var readdir = promisify(fs21.readdir);
81129
81129
  var arrify = (value = []) => Array.isArray(value) ? value : [value];
81130
81130
  var flatten = (list, result = []) => {
81131
81131
  list.forEach((item) => {
@@ -81158,19 +81158,19 @@ var require_chokidar = __commonJS({
81158
81158
  }
81159
81159
  return str;
81160
81160
  };
81161
- var normalizePathToUnix = (path16) => toUnix(sysPath.normalize(toUnix(path16)));
81162
- var normalizeIgnored = (cwd = EMPTY_STR) => (path16) => {
81163
- if (typeof path16 !== STRING_TYPE) return path16;
81164
- return normalizePathToUnix(sysPath.isAbsolute(path16) ? path16 : sysPath.join(cwd, path16));
81161
+ var normalizePathToUnix = (path17) => toUnix(sysPath.normalize(toUnix(path17)));
81162
+ var normalizeIgnored = (cwd = EMPTY_STR) => (path17) => {
81163
+ if (typeof path17 !== STRING_TYPE) return path17;
81164
+ return normalizePathToUnix(sysPath.isAbsolute(path17) ? path17 : sysPath.join(cwd, path17));
81165
81165
  };
81166
- var getAbsolutePath = (path16, cwd) => {
81167
- if (sysPath.isAbsolute(path16)) {
81168
- return path16;
81166
+ var getAbsolutePath = (path17, cwd) => {
81167
+ if (sysPath.isAbsolute(path17)) {
81168
+ return path17;
81169
81169
  }
81170
- if (path16.startsWith(BANG)) {
81171
- return BANG + sysPath.join(cwd, path16.slice(1));
81170
+ if (path17.startsWith(BANG)) {
81171
+ return BANG + sysPath.join(cwd, path17.slice(1));
81172
81172
  }
81173
- return sysPath.join(cwd, path16);
81173
+ return sysPath.join(cwd, path17);
81174
81174
  };
81175
81175
  var undef = (opts, key) => opts[key] === void 0;
81176
81176
  var DirEntry = class {
@@ -81226,16 +81226,16 @@ var require_chokidar = __commonJS({
81226
81226
  var STAT_METHOD_F = "stat";
81227
81227
  var STAT_METHOD_L = "lstat";
81228
81228
  var WatchHelper = class {
81229
- constructor(path16, watchPath, follow, fsw) {
81229
+ constructor(path17, watchPath, follow, fsw) {
81230
81230
  this.fsw = fsw;
81231
- this.path = path16 = path16.replace(REPLACER_RE, EMPTY_STR);
81231
+ this.path = path17 = path17.replace(REPLACER_RE, EMPTY_STR);
81232
81232
  this.watchPath = watchPath;
81233
81233
  this.fullWatchPath = sysPath.resolve(watchPath);
81234
- this.hasGlob = watchPath !== path16;
81235
- if (path16 === EMPTY_STR) this.hasGlob = false;
81234
+ this.hasGlob = watchPath !== path17;
81235
+ if (path17 === EMPTY_STR) this.hasGlob = false;
81236
81236
  this.globSymlink = this.hasGlob && follow ? void 0 : false;
81237
- this.globFilter = this.hasGlob ? anymatch(path16, void 0, ANYMATCH_OPTS) : false;
81238
- this.dirParts = this.getDirParts(path16);
81237
+ this.globFilter = this.hasGlob ? anymatch(path17, void 0, ANYMATCH_OPTS) : false;
81238
+ this.dirParts = this.getDirParts(path17);
81239
81239
  this.dirParts.forEach((parts) => {
81240
81240
  if (parts.length > 1) parts.pop();
81241
81241
  });
@@ -81264,12 +81264,12 @@ var require_chokidar = __commonJS({
81264
81264
  const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ? this.globFilter(resolvedPath) : true;
81265
81265
  return matchesGlob && this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
81266
81266
  }
81267
- getDirParts(path16) {
81267
+ getDirParts(path17) {
81268
81268
  if (!this.hasGlob) return [];
81269
81269
  const parts = [];
81270
- const expandedPath = path16.includes(BRACE_START) ? braces.expand(path16) : [path16];
81271
- expandedPath.forEach((path17) => {
81272
- parts.push(sysPath.relative(this.watchPath, path17).split(SLASH_OR_BACK_SLASH_RE));
81270
+ const expandedPath = path17.includes(BRACE_START) ? braces.expand(path17) : [path17];
81271
+ expandedPath.forEach((path18) => {
81272
+ parts.push(sysPath.relative(this.watchPath, path18).split(SLASH_OR_BACK_SLASH_RE));
81273
81273
  });
81274
81274
  return parts;
81275
81275
  }
@@ -81375,34 +81375,34 @@ var require_chokidar = __commonJS({
81375
81375
  this.closed = false;
81376
81376
  let paths = unifyPaths(paths_);
81377
81377
  if (cwd) {
81378
- paths = paths.map((path16) => {
81379
- const absPath = getAbsolutePath(path16, cwd);
81380
- if (disableGlobbing || !isGlob(path16)) {
81378
+ paths = paths.map((path17) => {
81379
+ const absPath = getAbsolutePath(path17, cwd);
81380
+ if (disableGlobbing || !isGlob(path17)) {
81381
81381
  return absPath;
81382
81382
  }
81383
81383
  return normalizePath(absPath);
81384
81384
  });
81385
81385
  }
81386
- paths = paths.filter((path16) => {
81387
- if (path16.startsWith(BANG)) {
81388
- this._ignoredPaths.add(path16.slice(1));
81386
+ paths = paths.filter((path17) => {
81387
+ if (path17.startsWith(BANG)) {
81388
+ this._ignoredPaths.add(path17.slice(1));
81389
81389
  return false;
81390
81390
  }
81391
- this._ignoredPaths.delete(path16);
81392
- this._ignoredPaths.delete(path16 + SLASH_GLOBSTAR);
81391
+ this._ignoredPaths.delete(path17);
81392
+ this._ignoredPaths.delete(path17 + SLASH_GLOBSTAR);
81393
81393
  this._userIgnored = void 0;
81394
81394
  return true;
81395
81395
  });
81396
81396
  if (this.options.useFsEvents && this._fsEventsHandler) {
81397
81397
  if (!this._readyCount) this._readyCount = paths.length;
81398
81398
  if (this.options.persistent) this._readyCount += paths.length;
81399
- paths.forEach((path16) => this._fsEventsHandler._addToFsEvents(path16));
81399
+ paths.forEach((path17) => this._fsEventsHandler._addToFsEvents(path17));
81400
81400
  } else {
81401
81401
  if (!this._readyCount) this._readyCount = 0;
81402
81402
  this._readyCount += paths.length;
81403
81403
  Promise.all(
81404
- paths.map(async (path16) => {
81405
- const res = await this._nodeFsHandler._addToNodeFs(path16, !_internal, 0, 0, _origAdd);
81404
+ paths.map(async (path17) => {
81405
+ const res = await this._nodeFsHandler._addToNodeFs(path17, !_internal, 0, 0, _origAdd);
81406
81406
  if (res) this._emitReady();
81407
81407
  return res;
81408
81408
  })
@@ -81424,15 +81424,15 @@ var require_chokidar = __commonJS({
81424
81424
  if (this.closed) return this;
81425
81425
  const paths = unifyPaths(paths_);
81426
81426
  const { cwd } = this.options;
81427
- paths.forEach((path16) => {
81428
- if (!sysPath.isAbsolute(path16) && !this._closers.has(path16)) {
81429
- if (cwd) path16 = sysPath.join(cwd, path16);
81430
- path16 = sysPath.resolve(path16);
81427
+ paths.forEach((path17) => {
81428
+ if (!sysPath.isAbsolute(path17) && !this._closers.has(path17)) {
81429
+ if (cwd) path17 = sysPath.join(cwd, path17);
81430
+ path17 = sysPath.resolve(path17);
81431
81431
  }
81432
- this._closePath(path16);
81433
- this._ignoredPaths.add(path16);
81434
- if (this._watched.has(path16)) {
81435
- this._ignoredPaths.add(path16 + SLASH_GLOBSTAR);
81432
+ this._closePath(path17);
81433
+ this._ignoredPaths.add(path17);
81434
+ if (this._watched.has(path17)) {
81435
+ this._ignoredPaths.add(path17 + SLASH_GLOBSTAR);
81436
81436
  }
81437
81437
  this._userIgnored = void 0;
81438
81438
  });
@@ -81490,36 +81490,36 @@ var require_chokidar = __commonJS({
81490
81490
  * @param {*=} val3
81491
81491
  * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
81492
81492
  */
81493
- async _emit(event, path16, val1, val2, val3) {
81493
+ async _emit(event, path17, val1, val2, val3) {
81494
81494
  if (this.closed) return;
81495
81495
  const opts = this.options;
81496
- if (isWindows) path16 = sysPath.normalize(path16);
81497
- if (opts.cwd) path16 = sysPath.relative(opts.cwd, path16);
81498
- const args = [event, path16];
81496
+ if (isWindows) path17 = sysPath.normalize(path17);
81497
+ if (opts.cwd) path17 = sysPath.relative(opts.cwd, path17);
81498
+ const args = [event, path17];
81499
81499
  if (val3 !== void 0) args.push(val1, val2, val3);
81500
81500
  else if (val2 !== void 0) args.push(val1, val2);
81501
81501
  else if (val1 !== void 0) args.push(val1);
81502
81502
  const awf = opts.awaitWriteFinish;
81503
81503
  let pw;
81504
- if (awf && (pw = this._pendingWrites.get(path16))) {
81504
+ if (awf && (pw = this._pendingWrites.get(path17))) {
81505
81505
  pw.lastChange = /* @__PURE__ */ new Date();
81506
81506
  return this;
81507
81507
  }
81508
81508
  if (opts.atomic) {
81509
81509
  if (event === EV_UNLINK) {
81510
- this._pendingUnlinks.set(path16, args);
81510
+ this._pendingUnlinks.set(path17, args);
81511
81511
  setTimeout(() => {
81512
- this._pendingUnlinks.forEach((entry, path17) => {
81512
+ this._pendingUnlinks.forEach((entry, path18) => {
81513
81513
  this.emit(...entry);
81514
81514
  this.emit(EV_ALL, ...entry);
81515
- this._pendingUnlinks.delete(path17);
81515
+ this._pendingUnlinks.delete(path18);
81516
81516
  });
81517
81517
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
81518
81518
  return this;
81519
81519
  }
81520
- if (event === EV_ADD && this._pendingUnlinks.has(path16)) {
81520
+ if (event === EV_ADD && this._pendingUnlinks.has(path17)) {
81521
81521
  event = args[0] = EV_CHANGE;
81522
- this._pendingUnlinks.delete(path16);
81522
+ this._pendingUnlinks.delete(path17);
81523
81523
  }
81524
81524
  }
81525
81525
  if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {
@@ -81537,15 +81537,15 @@ var require_chokidar = __commonJS({
81537
81537
  this.emitWithAll(event, args);
81538
81538
  }
81539
81539
  };
81540
- this._awaitWriteFinish(path16, awf.stabilityThreshold, event, awfEmit);
81540
+ this._awaitWriteFinish(path17, awf.stabilityThreshold, event, awfEmit);
81541
81541
  return this;
81542
81542
  }
81543
81543
  if (event === EV_CHANGE) {
81544
- const isThrottled = !this._throttle(EV_CHANGE, path16, 50);
81544
+ const isThrottled = !this._throttle(EV_CHANGE, path17, 50);
81545
81545
  if (isThrottled) return this;
81546
81546
  }
81547
81547
  if (opts.alwaysStat && val1 === void 0 && (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)) {
81548
- const fullPath = opts.cwd ? sysPath.join(opts.cwd, path16) : path16;
81548
+ const fullPath = opts.cwd ? sysPath.join(opts.cwd, path17) : path17;
81549
81549
  let stats;
81550
81550
  try {
81551
81551
  stats = await stat(fullPath);
@@ -81576,28 +81576,28 @@ var require_chokidar = __commonJS({
81576
81576
  * @param {Number} timeout duration of time to suppress duplicate actions
81577
81577
  * @returns {Object|false} tracking object or false if action should be suppressed
81578
81578
  */
81579
- _throttle(actionType, path16, timeout) {
81579
+ _throttle(actionType, path17, timeout) {
81580
81580
  if (!this._throttled.has(actionType)) {
81581
81581
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
81582
81582
  }
81583
81583
  const action = this._throttled.get(actionType);
81584
- const actionPath = action.get(path16);
81584
+ const actionPath = action.get(path17);
81585
81585
  if (actionPath) {
81586
81586
  actionPath.count++;
81587
81587
  return false;
81588
81588
  }
81589
81589
  let timeoutObject;
81590
81590
  const clear = () => {
81591
- const item = action.get(path16);
81591
+ const item = action.get(path17);
81592
81592
  const count = item ? item.count : 0;
81593
- action.delete(path16);
81593
+ action.delete(path17);
81594
81594
  clearTimeout(timeoutObject);
81595
81595
  if (item) clearTimeout(item.timeoutObject);
81596
81596
  return count;
81597
81597
  };
81598
81598
  timeoutObject = setTimeout(clear, timeout);
81599
81599
  const thr = { timeoutObject, clear, count: 0 };
81600
- action.set(path16, thr);
81600
+ action.set(path17, thr);
81601
81601
  return thr;
81602
81602
  }
81603
81603
  _incrReadyCount() {
@@ -81611,27 +81611,27 @@ var require_chokidar = __commonJS({
81611
81611
  * @param {EventName} event
81612
81612
  * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
81613
81613
  */
81614
- _awaitWriteFinish(path16, threshold, event, awfEmit) {
81614
+ _awaitWriteFinish(path17, threshold, event, awfEmit) {
81615
81615
  let timeoutHandler;
81616
- let fullPath = path16;
81617
- if (this.options.cwd && !sysPath.isAbsolute(path16)) {
81618
- fullPath = sysPath.join(this.options.cwd, path16);
81616
+ let fullPath = path17;
81617
+ if (this.options.cwd && !sysPath.isAbsolute(path17)) {
81618
+ fullPath = sysPath.join(this.options.cwd, path17);
81619
81619
  }
81620
81620
  const now = /* @__PURE__ */ new Date();
81621
81621
  const awaitWriteFinish = (prevStat) => {
81622
- fs20.stat(fullPath, (err, curStat) => {
81623
- if (err || !this._pendingWrites.has(path16)) {
81622
+ fs21.stat(fullPath, (err, curStat) => {
81623
+ if (err || !this._pendingWrites.has(path17)) {
81624
81624
  if (err && err.code !== "ENOENT") awfEmit(err);
81625
81625
  return;
81626
81626
  }
81627
81627
  const now2 = Number(/* @__PURE__ */ new Date());
81628
81628
  if (prevStat && curStat.size !== prevStat.size) {
81629
- this._pendingWrites.get(path16).lastChange = now2;
81629
+ this._pendingWrites.get(path17).lastChange = now2;
81630
81630
  }
81631
- const pw = this._pendingWrites.get(path16);
81631
+ const pw = this._pendingWrites.get(path17);
81632
81632
  const df = now2 - pw.lastChange;
81633
81633
  if (df >= threshold) {
81634
- this._pendingWrites.delete(path16);
81634
+ this._pendingWrites.delete(path17);
81635
81635
  awfEmit(void 0, curStat);
81636
81636
  } else {
81637
81637
  timeoutHandler = setTimeout(
@@ -81642,11 +81642,11 @@ var require_chokidar = __commonJS({
81642
81642
  }
81643
81643
  });
81644
81644
  };
81645
- if (!this._pendingWrites.has(path16)) {
81646
- this._pendingWrites.set(path16, {
81645
+ if (!this._pendingWrites.has(path17)) {
81646
+ this._pendingWrites.set(path17, {
81647
81647
  lastChange: now,
81648
81648
  cancelWait: () => {
81649
- this._pendingWrites.delete(path16);
81649
+ this._pendingWrites.delete(path17);
81650
81650
  clearTimeout(timeoutHandler);
81651
81651
  return event;
81652
81652
  }
@@ -81666,20 +81666,20 @@ var require_chokidar = __commonJS({
81666
81666
  * @param {fs.Stats=} stats result of fs.stat
81667
81667
  * @returns {Boolean}
81668
81668
  */
81669
- _isIgnored(path16, stats) {
81670
- if (this.options.atomic && DOT_RE.test(path16)) return true;
81669
+ _isIgnored(path17, stats) {
81670
+ if (this.options.atomic && DOT_RE.test(path17)) return true;
81671
81671
  if (!this._userIgnored) {
81672
81672
  const { cwd } = this.options;
81673
81673
  const ign = this.options.ignored;
81674
81674
  const ignored = ign && ign.map(normalizeIgnored(cwd));
81675
- const paths = arrify(ignored).filter((path17) => typeof path17 === STRING_TYPE && !isGlob(path17)).map((path17) => path17 + SLASH_GLOBSTAR);
81675
+ const paths = arrify(ignored).filter((path18) => typeof path18 === STRING_TYPE && !isGlob(path18)).map((path18) => path18 + SLASH_GLOBSTAR);
81676
81676
  const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
81677
81677
  this._userIgnored = anymatch(list, void 0, ANYMATCH_OPTS);
81678
81678
  }
81679
- return this._userIgnored([path16, stats]);
81679
+ return this._userIgnored([path17, stats]);
81680
81680
  }
81681
- _isntIgnored(path16, stat2) {
81682
- return !this._isIgnored(path16, stat2);
81681
+ _isntIgnored(path17, stat2) {
81682
+ return !this._isIgnored(path17, stat2);
81683
81683
  }
81684
81684
  /**
81685
81685
  * Provides a set of common helpers and properties relating to symlink and glob handling.
@@ -81687,10 +81687,10 @@ var require_chokidar = __commonJS({
81687
81687
  * @param {Number=} depth at any depth > 0, this isn't a glob
81688
81688
  * @returns {WatchHelper} object containing helpers for this path
81689
81689
  */
81690
- _getWatchHelpers(path16, depth) {
81691
- const watchPath = depth || this.options.disableGlobbing || !isGlob(path16) ? path16 : globParent(path16);
81690
+ _getWatchHelpers(path17, depth) {
81691
+ const watchPath = depth || this.options.disableGlobbing || !isGlob(path17) ? path17 : globParent(path17);
81692
81692
  const follow = this.options.followSymlinks;
81693
- return new WatchHelper(path16, watchPath, follow, this);
81693
+ return new WatchHelper(path17, watchPath, follow, this);
81694
81694
  }
81695
81695
  // Directory helpers
81696
81696
  // -----------------
@@ -81729,66 +81729,66 @@ var require_chokidar = __commonJS({
81729
81729
  * @returns {void}
81730
81730
  */
81731
81731
  _remove(directory, item, isDirectory) {
81732
- const path16 = sysPath.join(directory, item);
81733
- const fullPath = sysPath.resolve(path16);
81734
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path16) || this._watched.has(fullPath);
81735
- if (!this._throttle("remove", path16, 100)) return;
81732
+ const path17 = sysPath.join(directory, item);
81733
+ const fullPath = sysPath.resolve(path17);
81734
+ isDirectory = isDirectory != null ? isDirectory : this._watched.has(path17) || this._watched.has(fullPath);
81735
+ if (!this._throttle("remove", path17, 100)) return;
81736
81736
  if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {
81737
81737
  this.add(directory, item, true);
81738
81738
  }
81739
- const wp = this._getWatchedDir(path16);
81739
+ const wp = this._getWatchedDir(path17);
81740
81740
  const nestedDirectoryChildren = wp.getChildren();
81741
- nestedDirectoryChildren.forEach((nested) => this._remove(path16, nested));
81741
+ nestedDirectoryChildren.forEach((nested) => this._remove(path17, nested));
81742
81742
  const parent = this._getWatchedDir(directory);
81743
81743
  const wasTracked = parent.has(item);
81744
81744
  parent.remove(item);
81745
81745
  if (this._symlinkPaths.has(fullPath)) {
81746
81746
  this._symlinkPaths.delete(fullPath);
81747
81747
  }
81748
- let relPath = path16;
81749
- if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path16);
81748
+ let relPath = path17;
81749
+ if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path17);
81750
81750
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
81751
81751
  const event = this._pendingWrites.get(relPath).cancelWait();
81752
81752
  if (event === EV_ADD) return;
81753
81753
  }
81754
- this._watched.delete(path16);
81754
+ this._watched.delete(path17);
81755
81755
  this._watched.delete(fullPath);
81756
81756
  const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;
81757
- if (wasTracked && !this._isIgnored(path16)) this._emit(eventName, path16);
81757
+ if (wasTracked && !this._isIgnored(path17)) this._emit(eventName, path17);
81758
81758
  if (!this.options.useFsEvents) {
81759
- this._closePath(path16);
81759
+ this._closePath(path17);
81760
81760
  }
81761
81761
  }
81762
81762
  /**
81763
81763
  * Closes all watchers for a path
81764
81764
  * @param {Path} path
81765
81765
  */
81766
- _closePath(path16) {
81767
- this._closeFile(path16);
81768
- const dir = sysPath.dirname(path16);
81769
- this._getWatchedDir(dir).remove(sysPath.basename(path16));
81766
+ _closePath(path17) {
81767
+ this._closeFile(path17);
81768
+ const dir = sysPath.dirname(path17);
81769
+ this._getWatchedDir(dir).remove(sysPath.basename(path17));
81770
81770
  }
81771
81771
  /**
81772
81772
  * Closes only file-specific watchers
81773
81773
  * @param {Path} path
81774
81774
  */
81775
- _closeFile(path16) {
81776
- const closers = this._closers.get(path16);
81775
+ _closeFile(path17) {
81776
+ const closers = this._closers.get(path17);
81777
81777
  if (!closers) return;
81778
81778
  closers.forEach((closer) => closer());
81779
- this._closers.delete(path16);
81779
+ this._closers.delete(path17);
81780
81780
  }
81781
81781
  /**
81782
81782
  *
81783
81783
  * @param {Path} path
81784
81784
  * @param {Function} closer
81785
81785
  */
81786
- _addPathCloser(path16, closer) {
81786
+ _addPathCloser(path17, closer) {
81787
81787
  if (!closer) return;
81788
- let list = this._closers.get(path16);
81788
+ let list = this._closers.get(path17);
81789
81789
  if (!list) {
81790
81790
  list = [];
81791
- this._closers.set(path16, list);
81791
+ this._closers.set(path17, list);
81792
81792
  }
81793
81793
  list.push(closer);
81794
81794
  }
@@ -82976,13 +82976,13 @@ var require_ast = __commonJS({
82976
82976
  helperExpression: function helperExpression(node) {
82977
82977
  return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
82978
82978
  },
82979
- scopedId: function scopedId(path16) {
82980
- return /^\.|this\b/.test(path16.original);
82979
+ scopedId: function scopedId(path17) {
82980
+ return /^\.|this\b/.test(path17.original);
82981
82981
  },
82982
82982
  // an ID is simple if it only has one part, and that part is not
82983
82983
  // `..` or `this`.
82984
- simpleId: function simpleId(path16) {
82985
- return path16.parts.length === 1 && !AST.helpers.scopedId(path16) && !path16.depth;
82984
+ simpleId: function simpleId(path17) {
82985
+ return path17.parts.length === 1 && !AST.helpers.scopedId(path17) && !path17.depth;
82986
82986
  }
82987
82987
  }
82988
82988
  };
@@ -84052,12 +84052,12 @@ var require_helpers2 = __commonJS({
84052
84052
  loc
84053
84053
  };
84054
84054
  }
84055
- function prepareMustache(path16, params, hash2, open, strip, locInfo) {
84055
+ function prepareMustache(path17, params, hash2, open, strip, locInfo) {
84056
84056
  var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
84057
84057
  var decorator = /\*/.test(open);
84058
84058
  return {
84059
84059
  type: decorator ? "Decorator" : "MustacheStatement",
84060
- path: path16,
84060
+ path: path17,
84061
84061
  params,
84062
84062
  hash: hash2,
84063
84063
  escaped,
@@ -84375,9 +84375,9 @@ var require_compiler = __commonJS({
84375
84375
  },
84376
84376
  DecoratorBlock: function DecoratorBlock(decorator) {
84377
84377
  var program2 = decorator.program && this.compileProgram(decorator.program);
84378
- var params = this.setupFullMustacheParams(decorator, program2, void 0), path16 = decorator.path;
84378
+ var params = this.setupFullMustacheParams(decorator, program2, void 0), path17 = decorator.path;
84379
84379
  this.useDecorators = true;
84380
- this.opcode("registerDecorator", params.length, path16.original);
84380
+ this.opcode("registerDecorator", params.length, path17.original);
84381
84381
  },
84382
84382
  PartialStatement: function PartialStatement(partial2) {
84383
84383
  this.usePartial = true;
@@ -84441,46 +84441,46 @@ var require_compiler = __commonJS({
84441
84441
  }
84442
84442
  },
84443
84443
  ambiguousSexpr: function ambiguousSexpr(sexpr, program2, inverse) {
84444
- var path16 = sexpr.path, name = path16.parts[0], isBlock = program2 != null || inverse != null;
84445
- this.opcode("getContext", path16.depth);
84444
+ var path17 = sexpr.path, name = path17.parts[0], isBlock = program2 != null || inverse != null;
84445
+ this.opcode("getContext", path17.depth);
84446
84446
  this.opcode("pushProgram", program2);
84447
84447
  this.opcode("pushProgram", inverse);
84448
- path16.strict = true;
84449
- this.accept(path16);
84448
+ path17.strict = true;
84449
+ this.accept(path17);
84450
84450
  this.opcode("invokeAmbiguous", name, isBlock);
84451
84451
  },
84452
84452
  simpleSexpr: function simpleSexpr(sexpr) {
84453
- var path16 = sexpr.path;
84454
- path16.strict = true;
84455
- this.accept(path16);
84453
+ var path17 = sexpr.path;
84454
+ path17.strict = true;
84455
+ this.accept(path17);
84456
84456
  this.opcode("resolvePossibleLambda");
84457
84457
  },
84458
84458
  helperSexpr: function helperSexpr(sexpr, program2, inverse) {
84459
- var params = this.setupFullMustacheParams(sexpr, program2, inverse), path16 = sexpr.path, name = path16.parts[0];
84459
+ var params = this.setupFullMustacheParams(sexpr, program2, inverse), path17 = sexpr.path, name = path17.parts[0];
84460
84460
  if (this.options.knownHelpers[name]) {
84461
84461
  this.opcode("invokeKnownHelper", params.length, name);
84462
84462
  } else if (this.options.knownHelpersOnly) {
84463
84463
  throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
84464
84464
  } else {
84465
- path16.strict = true;
84466
- path16.falsy = true;
84467
- this.accept(path16);
84468
- this.opcode("invokeHelper", params.length, path16.original, _ast2["default"].helpers.simpleId(path16));
84465
+ path17.strict = true;
84466
+ path17.falsy = true;
84467
+ this.accept(path17);
84468
+ this.opcode("invokeHelper", params.length, path17.original, _ast2["default"].helpers.simpleId(path17));
84469
84469
  }
84470
84470
  },
84471
- PathExpression: function PathExpression(path16) {
84472
- this.addDepth(path16.depth);
84473
- this.opcode("getContext", path16.depth);
84474
- var name = path16.parts[0], scoped = _ast2["default"].helpers.scopedId(path16), blockParamId = !path16.depth && !scoped && this.blockParamIndex(name);
84471
+ PathExpression: function PathExpression(path17) {
84472
+ this.addDepth(path17.depth);
84473
+ this.opcode("getContext", path17.depth);
84474
+ var name = path17.parts[0], scoped = _ast2["default"].helpers.scopedId(path17), blockParamId = !path17.depth && !scoped && this.blockParamIndex(name);
84475
84475
  if (blockParamId) {
84476
- this.opcode("lookupBlockParam", blockParamId, path16.parts);
84476
+ this.opcode("lookupBlockParam", blockParamId, path17.parts);
84477
84477
  } else if (!name) {
84478
84478
  this.opcode("pushContext");
84479
- } else if (path16.data) {
84479
+ } else if (path17.data) {
84480
84480
  this.options.data = true;
84481
- this.opcode("lookupData", path16.depth, path16.parts, path16.strict);
84481
+ this.opcode("lookupData", path17.depth, path17.parts, path17.strict);
84482
84482
  } else {
84483
- this.opcode("lookupOnContext", path16.parts, path16.falsy, path16.strict, scoped);
84483
+ this.opcode("lookupOnContext", path17.parts, path17.falsy, path17.strict, scoped);
84484
84484
  }
84485
84485
  },
84486
84486
  StringLiteral: function StringLiteral(string4) {
@@ -84830,16 +84830,16 @@ var require_util10 = __commonJS({
84830
84830
  }
84831
84831
  exports2.urlGenerate = urlGenerate;
84832
84832
  function normalize(aPath) {
84833
- var path16 = aPath;
84833
+ var path17 = aPath;
84834
84834
  var url2 = urlParse(aPath);
84835
84835
  if (url2) {
84836
84836
  if (!url2.path) {
84837
84837
  return aPath;
84838
84838
  }
84839
- path16 = url2.path;
84839
+ path17 = url2.path;
84840
84840
  }
84841
- var isAbsolute2 = exports2.isAbsolute(path16);
84842
- var parts = path16.split(/\/+/);
84841
+ var isAbsolute2 = exports2.isAbsolute(path17);
84842
+ var parts = path17.split(/\/+/);
84843
84843
  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
84844
84844
  part = parts[i];
84845
84845
  if (part === ".") {
@@ -84856,15 +84856,15 @@ var require_util10 = __commonJS({
84856
84856
  }
84857
84857
  }
84858
84858
  }
84859
- path16 = parts.join("/");
84860
- if (path16 === "") {
84861
- path16 = isAbsolute2 ? "/" : ".";
84859
+ path17 = parts.join("/");
84860
+ if (path17 === "") {
84861
+ path17 = isAbsolute2 ? "/" : ".";
84862
84862
  }
84863
84863
  if (url2) {
84864
- url2.path = path16;
84864
+ url2.path = path17;
84865
84865
  return urlGenerate(url2);
84866
84866
  }
84867
- return path16;
84867
+ return path17;
84868
84868
  }
84869
84869
  exports2.normalize = normalize;
84870
84870
  function join3(aRoot, aPath) {
@@ -87647,8 +87647,8 @@ var require_printer = __commonJS({
87647
87647
  return this.accept(sexpr.path) + " " + params + hash2;
87648
87648
  };
87649
87649
  PrintVisitor.prototype.PathExpression = function(id) {
87650
- var path16 = id.parts.join("/");
87651
- return (id.data ? "@" : "") + "PATH:" + path16;
87650
+ var path17 = id.parts.join("/");
87651
+ return (id.data ? "@" : "") + "PATH:" + path17;
87652
87652
  };
87653
87653
  PrintVisitor.prototype.StringLiteral = function(string4) {
87654
87654
  return '"' + string4.value + '"';
@@ -87687,8 +87687,8 @@ var require_lib3 = __commonJS({
87687
87687
  handlebars.print = printer.print;
87688
87688
  module2.exports = handlebars;
87689
87689
  function extension(module3, filename) {
87690
- var fs20 = require("fs");
87691
- var templateString = fs20.readFileSync(filename, "utf8");
87690
+ var fs21 = require("fs");
87691
+ var templateString = fs21.readFileSync(filename, "utf8");
87692
87692
  module3.exports = handlebars.compile(templateString);
87693
87693
  }
87694
87694
  if (typeof require !== "undefined" && require.extensions) {
@@ -87725,7 +87725,7 @@ var package_default = {
87725
87725
  type: "module",
87726
87726
  homepage: "https://appwrite.io/support",
87727
87727
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
87728
- version: "18.0.1",
87728
+ version: "18.1.0",
87729
87729
  license: "BSD-3-Clause",
87730
87730
  main: "dist/index.cjs",
87731
87731
  module: "dist/index.js",
@@ -87757,9 +87757,9 @@ var package_default = {
87757
87757
  "build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
87758
87758
  "build:runtime": "npm run build:lib:runtime && npm run build:cli",
87759
87759
  "build:lib:runtime": "npm run build:lib:esm && npm run build:lib:cjs",
87760
- "build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
87761
- "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --outfile=dist/index.cjs",
87762
- "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --outfile=dist/cli.cjs",
87760
+ "build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --external:terminal-image --outfile=dist/index.js",
87761
+ "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:terminal-image --outfile=dist/index.cjs",
87762
+ "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --external:terminal-image --outfile=dist/cli.cjs",
87763
87763
  lint: "eslint .",
87764
87764
  format: 'prettier --write "**/*.{js,ts,json,md}"',
87765
87765
  generate: "tsx scripts/generate-commands.ts",
@@ -87770,7 +87770,7 @@ var package_default = {
87770
87770
  "mac-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-x64 --outfile build/appwrite-cli-darwin-x64",
87771
87771
  "mac-arm64": "bun build cli.ts --compile --sourcemap=inline --target=bun-darwin-arm64 --outfile build/appwrite-cli-darwin-arm64",
87772
87772
  "windows-x64": "bun build cli.ts --compile --sourcemap=inline --target=bun-windows-x64 --outfile build/appwrite-cli-win-x64.exe",
87773
- "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
87773
+ "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
87774
87774
  },
87775
87775
  dependencies: {
87776
87776
  "@appwrite.io/console": "~9.1.0",
@@ -87789,9 +87789,13 @@ var package_default = {
87789
87789
  "string-width": "^7.2.0",
87790
87790
  tail: "^2.2.6",
87791
87791
  tar: "^7.4.3",
87792
+ "terminal-image": "^3.1.1",
87792
87793
  undici: "^6.24.0",
87793
87794
  zod: "^4.3.5"
87794
87795
  },
87796
+ overrides: {
87797
+ phin: "3.7.1"
87798
+ },
87795
87799
  devDependencies: {
87796
87800
  "@typescript-eslint/eslint-plugin": "^8.0.0",
87797
87801
  "@typescript-eslint/parser": "^8.0.0",
@@ -88595,10 +88599,10 @@ function mergeDefs(...defs) {
88595
88599
  function cloneDef(schema) {
88596
88600
  return mergeDefs(schema._zod.def);
88597
88601
  }
88598
- function getElementAtPath(obj, path16) {
88599
- if (!path16)
88602
+ function getElementAtPath(obj, path17) {
88603
+ if (!path17)
88600
88604
  return obj;
88601
- return path16.reduce((acc, key) => acc?.[key], obj);
88605
+ return path17.reduce((acc, key) => acc?.[key], obj);
88602
88606
  }
88603
88607
  function promiseAllObject(promisesObj) {
88604
88608
  const keys = Object.keys(promisesObj);
@@ -88981,11 +88985,11 @@ function aborted(x, startIndex = 0) {
88981
88985
  }
88982
88986
  return false;
88983
88987
  }
88984
- function prefixIssues(path16, issues) {
88988
+ function prefixIssues(path17, issues) {
88985
88989
  return issues.map((iss) => {
88986
88990
  var _a3;
88987
88991
  (_a3 = iss).path ?? (_a3.path = []);
88988
- iss.path.unshift(path16);
88992
+ iss.path.unshift(path17);
88989
88993
  return iss;
88990
88994
  });
88991
88995
  }
@@ -89168,7 +89172,7 @@ function formatError(error49, mapper = (issue2) => issue2.message) {
89168
89172
  }
89169
89173
  function treeifyError(error49, mapper = (issue2) => issue2.message) {
89170
89174
  const result = { errors: [] };
89171
- const processError = (error50, path16 = []) => {
89175
+ const processError = (error50, path17 = []) => {
89172
89176
  var _a3, _b;
89173
89177
  for (const issue2 of error50.issues) {
89174
89178
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -89178,7 +89182,7 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
89178
89182
  } else if (issue2.code === "invalid_element") {
89179
89183
  processError({ issues: issue2.issues }, issue2.path);
89180
89184
  } else {
89181
- const fullpath = [...path16, ...issue2.path];
89185
+ const fullpath = [...path17, ...issue2.path];
89182
89186
  if (fullpath.length === 0) {
89183
89187
  result.errors.push(mapper(issue2));
89184
89188
  continue;
@@ -89210,8 +89214,8 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
89210
89214
  }
89211
89215
  function toDotPath(_path2) {
89212
89216
  const segs = [];
89213
- const path16 = _path2.map((seg) => typeof seg === "object" ? seg.key : seg);
89214
- for (const seg of path16) {
89217
+ const path17 = _path2.map((seg) => typeof seg === "object" ? seg.key : seg);
89218
+ for (const seg of path17) {
89215
89219
  if (typeof seg === "number")
89216
89220
  segs.push(`[${seg}]`);
89217
89221
  else if (typeof seg === "symbol")
@@ -101188,13 +101192,13 @@ function resolveRef(ref, ctx) {
101188
101192
  if (!ref.startsWith("#")) {
101189
101193
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
101190
101194
  }
101191
- const path16 = ref.slice(1).split("/").filter(Boolean);
101192
- if (path16.length === 0) {
101195
+ const path17 = ref.slice(1).split("/").filter(Boolean);
101196
+ if (path17.length === 0) {
101193
101197
  return ctx.rootSchema;
101194
101198
  }
101195
101199
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
101196
- if (path16[0] === defsKey) {
101197
- const key = path16[1];
101200
+ if (path17[0] === defsKey) {
101201
+ const key = path17[1];
101198
101202
  if (!key || !ctx.defs[key]) {
101199
101203
  throw new Error(`Reference not found: ${ref}`);
101200
101204
  }
@@ -102031,7 +102035,7 @@ var import_child_process = __toESM(require("child_process"), 1);
102031
102035
  // lib/constants.ts
102032
102036
  var SDK_TITLE = "Appwrite";
102033
102037
  var SDK_TITLE_LOWER = "appwrite";
102034
- var SDK_VERSION = "18.0.0";
102038
+ var SDK_VERSION = "18.1.0";
102035
102039
  var SDK_NAME = "Command Line";
102036
102040
  var SDK_PLATFORM = "console";
102037
102041
  var SDK_LANGUAGE = "cli";
@@ -102117,6 +102121,111 @@ var getErrorMessage = (error49) => {
102117
102121
  }
102118
102122
  return String(error49);
102119
102123
  };
102124
+ var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
102125
+ var HOMEBREW_FORMULA_NAME = EXECUTABLE_NAME.toLowerCase();
102126
+ var getExecutablePaths = () => {
102127
+ const execPath = process.execPath;
102128
+ const scriptPath = process.argv[1] ?? "";
102129
+ try {
102130
+ return {
102131
+ execPath,
102132
+ realExecPath: import_fs.default.realpathSync.native(execPath),
102133
+ scriptPath
102134
+ };
102135
+ } catch (_error) {
102136
+ return {
102137
+ execPath,
102138
+ realExecPath: execPath,
102139
+ scriptPath
102140
+ };
102141
+ }
102142
+ };
102143
+ var isExecutableName = (candidatePath) => {
102144
+ const basename = import_path.default.basename(candidatePath).toLowerCase();
102145
+ return basename === EXECUTABLE_NAME.toLowerCase() || basename === WINDOWS_EXECUTABLE_NAME;
102146
+ };
102147
+ var isHomebrewManagedPath = (candidatePath) => {
102148
+ return candidatePath.includes("/opt/homebrew/") || candidatePath.includes("/usr/local/Cellar/") || candidatePath.includes("/home/linuxbrew/.linuxbrew/") || candidatePath.includes("/linuxbrew/.linuxbrew/");
102149
+ };
102150
+ var isInstalledViaNpm = () => {
102151
+ try {
102152
+ const { scriptPath } = getExecutablePaths();
102153
+ if (scriptPath.includes("node_modules") && scriptPath.includes(NPM_PACKAGE_NAME)) {
102154
+ return true;
102155
+ }
102156
+ if (scriptPath.includes("/usr/local/lib/node_modules/") || scriptPath.includes("/opt/homebrew/lib/node_modules/") || scriptPath.includes("/.npm-global/") || scriptPath.includes("/node_modules/.bin/") || scriptPath.includes("/.nvm/versions/node/")) {
102157
+ return true;
102158
+ }
102159
+ return false;
102160
+ } catch (_error) {
102161
+ return false;
102162
+ }
102163
+ };
102164
+ var isInstalledViaHomebrew = () => {
102165
+ try {
102166
+ const { execPath, realExecPath, scriptPath } = getExecutablePaths();
102167
+ const runtimeCandidates = [execPath, realExecPath].filter(isExecutableName);
102168
+ return [scriptPath, ...runtimeCandidates].some(isHomebrewManagedPath);
102169
+ } catch (_error) {
102170
+ return false;
102171
+ }
102172
+ };
102173
+ var isInstalledViaStandaloneBinary = () => {
102174
+ if (isInstalledViaNpm() || isInstalledViaHomebrew()) {
102175
+ return false;
102176
+ }
102177
+ try {
102178
+ const { execPath, realExecPath } = getExecutablePaths();
102179
+ return [execPath, realExecPath].some(isExecutableName);
102180
+ } catch (_error) {
102181
+ return false;
102182
+ }
102183
+ };
102184
+ var detectInstallationMethod = () => {
102185
+ if (isInstalledViaNpm()) {
102186
+ return "npm";
102187
+ }
102188
+ if (isInstalledViaHomebrew()) {
102189
+ return "homebrew";
102190
+ }
102191
+ if (isInstalledViaStandaloneBinary()) {
102192
+ return "standalone";
102193
+ }
102194
+ return null;
102195
+ };
102196
+ var getLatestVersionSource = (method = detectInstallationMethod()) => {
102197
+ return method === "homebrew" ? "homebrew" : "npm";
102198
+ };
102199
+ var normalizeHomebrewVersion = (version4) => {
102200
+ return version4.split("_")[0].trim();
102201
+ };
102202
+ var getHomebrewLatestVersion = async (options = {}) => {
102203
+ try {
102204
+ const output = import_child_process.default.execFileSync(
102205
+ "brew",
102206
+ ["info", "--json=v2", HOMEBREW_FORMULA_NAME],
102207
+ {
102208
+ encoding: "utf8",
102209
+ stdio: ["ignore", "pipe", "pipe"],
102210
+ timeout: options.timeoutMs,
102211
+ env: {
102212
+ ...process.env,
102213
+ HOMEBREW_NO_AUTO_UPDATE: "1"
102214
+ }
102215
+ }
102216
+ );
102217
+ const parsed = JSON.parse(output);
102218
+ const stableVersion = parsed.formulae?.[0]?.versions?.stable;
102219
+ if (typeof stableVersion !== "string" || stableVersion.trim() === "") {
102220
+ throw new Error("Homebrew did not return a stable formula version.");
102221
+ }
102222
+ return normalizeHomebrewVersion(stableVersion);
102223
+ } catch (error49) {
102224
+ throw new Error(
102225
+ `Failed to fetch latest Homebrew version: ${getErrorMessage(error49)}`
102226
+ );
102227
+ }
102228
+ };
102120
102229
  var isCloudHostname = (hostname3) => hostname3 === "cloud.appwrite.io" || hostname3.endsWith(".cloud.appwrite.io");
102121
102230
  var getConsoleBaseUrl = (endpoint) => {
102122
102231
  try {
@@ -102203,7 +102312,8 @@ var readUpdateCheckCache = () => {
102203
102312
  return {
102204
102313
  checkedAt: typeof parsed.checkedAt === "string" ? parsed.checkedAt : normalizeLegacyDate(parsed.checkedOn),
102205
102314
  latestVersion: typeof parsed.latestVersion === "string" ? parsed.latestVersion : void 0,
102206
- notifiedAt: typeof parsed.notifiedAt === "string" ? parsed.notifiedAt : normalizeLegacyDate(parsed.notifiedOn)
102315
+ notifiedAt: typeof parsed.notifiedAt === "string" ? parsed.notifiedAt : normalizeLegacyDate(parsed.notifiedOn),
102316
+ source: parsed.source === "npm" || parsed.source === "homebrew" ? parsed.source : void 0
102207
102317
  };
102208
102318
  } catch (_error) {
102209
102319
  return null;
@@ -102225,14 +102335,25 @@ var tryWriteUpdateCheckCache = (cache) => {
102225
102335
  } catch (_error) {
102226
102336
  }
102227
102337
  };
102338
+ var getCacheForVersionSource = (cache, source) => {
102339
+ if (!cache) {
102340
+ return null;
102341
+ }
102342
+ if (typeof cache.source === "string") {
102343
+ return cache.source === source ? cache : null;
102344
+ }
102345
+ return source === "npm" ? cache : null;
102346
+ };
102228
102347
  var syncVersionCheckCache = (currentVersion, latestVersion) => {
102229
102348
  const now = getCurrentTimestamp();
102230
- const existingCache = readUpdateCheckCache();
102349
+ const source = getLatestVersionSource();
102350
+ const existingCache = getCacheForVersionSource(readUpdateCheckCache(), source);
102231
102351
  const updateAvailable = compareVersions(currentVersion, latestVersion) > 0;
102232
102352
  tryWriteUpdateCheckCache({
102233
102353
  checkedAt: now,
102234
102354
  latestVersion,
102235
- notifiedAt: updateAvailable ? now : existingCache?.notifiedAt
102355
+ notifiedAt: updateAvailable ? now : existingCache?.notifiedAt,
102356
+ source
102236
102357
  });
102237
102358
  };
102238
102359
  async function getLatestVersion(options = {}) {
@@ -102249,6 +102370,18 @@ async function getLatestVersion(options = {}) {
102249
102370
  throw new Error(`Failed to fetch latest version: ${e.message}`);
102250
102371
  }
102251
102372
  }
102373
+ async function getLatestVersionForInstallation(method, options = {}) {
102374
+ switch (getLatestVersionSource(method)) {
102375
+ case "homebrew":
102376
+ return getHomebrewLatestVersion(options);
102377
+ case "npm":
102378
+ default:
102379
+ return getLatestVersion(options);
102380
+ }
102381
+ }
102382
+ async function getLatestVersionForCurrentInstallation(options = {}) {
102383
+ return getLatestVersionForInstallation(detectInstallationMethod(), options);
102384
+ }
102252
102385
  function compareVersions(current, latest) {
102253
102386
  const currentParts = current.split(".").map(Number);
102254
102387
  const latestParts = latest.split(".").map(Number);
@@ -102262,7 +102395,9 @@ function compareVersions(current, latest) {
102262
102395
  }
102263
102396
  async function getCachedUpdateNotification(currentVersion) {
102264
102397
  const now = getCurrentTimestamp();
102265
- const cache = readUpdateCheckCache();
102398
+ const installationMethod = detectInstallationMethod();
102399
+ const source = getLatestVersionSource(installationMethod);
102400
+ const cache = getCacheForVersionSource(readUpdateCheckCache(), source);
102266
102401
  if (isWithinUpdateInterval(cache?.checkedAt)) {
102267
102402
  if (!cache) {
102268
102403
  return null;
@@ -102278,15 +102413,19 @@ async function getCachedUpdateNotification(currentVersion) {
102278
102413
  return null;
102279
102414
  }
102280
102415
  try {
102281
- const latestVersion = await getLatestVersion({
102282
- timeoutMs: DEFAULT_UPDATE_CHECK_TIMEOUT_MS
102283
- });
102416
+ const latestVersion = await getLatestVersionForInstallation(
102417
+ installationMethod,
102418
+ {
102419
+ timeoutMs: DEFAULT_UPDATE_CHECK_TIMEOUT_MS
102420
+ }
102421
+ );
102284
102422
  const updateAvailable = compareVersions(currentVersion, latestVersion) > 0;
102285
102423
  const alreadyNotifiedRecently = isWithinUpdateInterval(cache?.notifiedAt);
102286
102424
  tryWriteUpdateCheckCache({
102287
102425
  checkedAt: now,
102288
102426
  latestVersion,
102289
- notifiedAt: updateAvailable && !alreadyNotifiedRecently ? now : cache?.notifiedAt
102427
+ notifiedAt: updateAvailable && !alreadyNotifiedRecently ? now : cache?.notifiedAt,
102428
+ source
102290
102429
  });
102291
102430
  return updateAvailable && !alreadyNotifiedRecently ? latestVersion : null;
102292
102431
  } catch (_error) {
@@ -102692,8 +102831,8 @@ function whitelistKeys(value, keys, nestedKeys = {}) {
102692
102831
  var Config = class {
102693
102832
  path;
102694
102833
  data;
102695
- constructor(path16) {
102696
- this.path = path16;
102834
+ constructor(path17) {
102835
+ this.path = path17;
102697
102836
  this.data = {};
102698
102837
  this.read();
102699
102838
  }
@@ -102783,10 +102922,10 @@ var Local = class _Local extends Config {
102783
102922
  static CONFIG_FILE_PATH = `${EXECUTABLE_NAME}.config.json`;
102784
102923
  static CONFIG_FILE_PATH_LEGACY = `${EXECUTABLE_NAME}.json`;
102785
102924
  configDirectoryPath = "";
102786
- constructor(path16 = _Local.CONFIG_FILE_PATH, legacyPath = _Local.CONFIG_FILE_PATH_LEGACY) {
102787
- let absolutePath = _Local.findConfigFile(path16) || _Local.findConfigFile(legacyPath);
102925
+ constructor(path17 = _Local.CONFIG_FILE_PATH, legacyPath = _Local.CONFIG_FILE_PATH_LEGACY) {
102926
+ let absolutePath = _Local.findConfigFile(path17) || _Local.findConfigFile(legacyPath);
102788
102927
  if (!absolutePath) {
102789
- absolutePath = `${import_process.default.cwd()}/${path16}`;
102928
+ absolutePath = `${import_process.default.cwd()}/${path17}`;
102790
102929
  }
102791
102930
  super(absolutePath);
102792
102931
  this.configDirectoryPath = import_path2.default.dirname(absolutePath);
@@ -103178,9 +103317,9 @@ var Global = class _Global extends Config {
103178
103317
  static MODE_ADMIN = "admin";
103179
103318
  static MODE_DEFAULT = "default";
103180
103319
  static PROJECT_CONSOLE = "console";
103181
- constructor(path16 = _Global.CONFIG_FILE_PATH) {
103320
+ constructor(path17 = _Global.CONFIG_FILE_PATH) {
103182
103321
  const homeDir = import_os2.default.homedir();
103183
- super(`${homeDir}/${path16}`);
103322
+ super(`${homeDir}/${path17}`);
103184
103323
  }
103185
103324
  getCurrentSession() {
103186
103325
  if (!this.has(_Global.PREFERENCE_CURRENT)) {
@@ -130254,9 +130393,9 @@ var import_inquirer = __toESM(require_inquirer(), 1);
130254
130393
 
130255
130394
  // lib/sdks.ts
130256
130395
  var import_os4 = __toESM(require("os"), 1);
130257
- var sdkForConsole = async (requiresAuth = true) => {
130396
+ var sdkForConsole = async (requiresAuth = true, endpointOverride) => {
130258
130397
  const client2 = new Client();
130259
- const endpoint = globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
130398
+ const endpoint = endpointOverride || globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
130260
130399
  const cookie = globalConfig2.getCookie();
130261
130400
  const selfSigned = globalConfig2.getSelfSigned();
130262
130401
  if (requiresAuth && cookie === "") {
@@ -131706,9 +131845,9 @@ var Client3 = class _Client {
131706
131845
  getHeaders() {
131707
131846
  return { ...this.headers };
131708
131847
  }
131709
- async call(method, path16 = "", headers = {}, params = {}, responseType = "json") {
131848
+ async call(method, path17 = "", headers = {}, params = {}, responseType = "json") {
131710
131849
  const mergedHeaders = { ...this.headers, ...headers };
131711
- const url2 = new URL(this.endpoint + path16);
131850
+ const url2 = new URL(this.endpoint + path17);
131712
131851
  let body = void 0;
131713
131852
  if (method.toUpperCase() === "GET") {
131714
131853
  url2.search = new URLSearchParams(
@@ -131753,7 +131892,7 @@ var Client3 = class _Client {
131753
131892
  } catch (_error) {
131754
131893
  throw new AppwriteException(text2, response.status, "", text2);
131755
131894
  }
131756
- if (path16 !== "/account" && json3.code === 401 && json3.type === "user_more_factors_required") {
131895
+ if (path17 !== "/account" && json3.code === 401 && json3.type === "user_more_factors_required") {
131757
131896
  console.log(
131758
131897
  `${import_chalk4.default.cyan.bold("\u2139 Info")} ${import_chalk4.default.cyan("Unusable account found, removing...")}`
131759
131898
  );
@@ -135880,8 +136019,8 @@ var Pull = class {
135880
136019
  /**
135881
136020
  * Set the base directory path for config files and resources
135882
136021
  */
135883
- setConfigDirectoryPath(path16) {
135884
- this.configDirectoryPath = path16;
136022
+ setConfigDirectoryPath(path17) {
136023
+ this.configDirectoryPath = path17;
135885
136024
  }
135886
136025
  /**
135887
136026
  * Log a message (respects silent mode)
@@ -139505,6 +139644,7 @@ run.command("function").alias("functions").description("Run functions in the cur
139505
139644
  var import_fs16 = __toESM(require("fs"), 1);
139506
139645
  var import_path15 = __toESM(require("path"), 1);
139507
139646
  var import_node_readline = __toESM(require("node:readline"), 1);
139647
+ var import_node_util = require("node:util");
139508
139648
  var import_dotenv2 = __toESM(require_main(), 1);
139509
139649
  var import_chalk13 = __toESM(require_source(), 1);
139510
139650
  var import_inquirer7 = __toESM(require_inquirer(), 1);
@@ -139630,11 +139770,11 @@ ${messages.join("\n\n")}`;
139630
139770
  }
139631
139771
  return String(value);
139632
139772
  }
139633
- static formatPath(path16, contextData) {
139634
- if (path16.length === 0) return "";
139773
+ static formatPath(path17, contextData) {
139774
+ if (path17.length === 0) return "";
139635
139775
  const formatted = [];
139636
- for (let i = 0; i < path16.length; i++) {
139637
- const segment = path16[i];
139776
+ for (let i = 0; i < path17.length; i++) {
139777
+ const segment = path17[i];
139638
139778
  if (typeof segment === "number") {
139639
139779
  formatted.push(`[${segment}]`);
139640
139780
  } else if (typeof segment === "string") {
@@ -139649,10 +139789,10 @@ ${messages.join("\n\n")}`;
139649
139789
  }
139650
139790
  return this.humanizePath(formatted.join(""), contextData);
139651
139791
  }
139652
- static humanizePath(path16, contextData) {
139792
+ static humanizePath(path17, contextData) {
139653
139793
  if (contextData) {
139654
- const resolvedPath = this.resolvePathWithNames(path16, contextData);
139655
- if (resolvedPath !== path16) {
139794
+ const resolvedPath = this.resolvePathWithNames(path17, contextData);
139795
+ if (resolvedPath !== path17) {
139656
139796
  return resolvedPath;
139657
139797
  }
139658
139798
  }
@@ -139686,14 +139826,14 @@ ${messages.join("\n\n")}`;
139686
139826
  { pattern: /^settings\.services$/, replacement: "services" }
139687
139827
  ];
139688
139828
  for (const { pattern, replacement } of patterns) {
139689
- if (pattern.test(path16)) {
139690
- return path16.replace(pattern, replacement);
139829
+ if (pattern.test(path17)) {
139830
+ return path17.replace(pattern, replacement);
139691
139831
  }
139692
139832
  }
139693
- return path16.replace(/\[(\d+)\]/g, " $1").replace(/\./g, " \u2192 ").replace(/^(\w)/, (match) => match.toUpperCase());
139833
+ return path17.replace(/\[(\d+)\]/g, " $1").replace(/\./g, " \u2192 ").replace(/^(\w)/, (match) => match.toUpperCase());
139694
139834
  }
139695
- static resolvePathWithNames(path16, contextData) {
139696
- const collectionAttributeMatch = path16.match(
139835
+ static resolvePathWithNames(path17, contextData) {
139836
+ const collectionAttributeMatch = path17.match(
139697
139837
  /^collections\[(\d+)\]\.attributes\[(\d+)\](.*)$/
139698
139838
  );
139699
139839
  if (collectionAttributeMatch) {
@@ -139706,7 +139846,7 @@ ${messages.join("\n\n")}`;
139706
139846
  return `Collections "${collectionName}" \u2192 attributes "${attributeName}"${remainder}`;
139707
139847
  }
139708
139848
  }
139709
- const collectionIndexMatch = path16.match(
139849
+ const collectionIndexMatch = path17.match(
139710
139850
  /^collections\[(\d+)\]\.indexes\[(\d+)\](.*)$/
139711
139851
  );
139712
139852
  if (collectionIndexMatch) {
@@ -139719,7 +139859,7 @@ ${messages.join("\n\n")}`;
139719
139859
  return `Collections "${collectionName}" \u2192 indexes "${indexName}"${remainder}`;
139720
139860
  }
139721
139861
  }
139722
- const collectionMatch = path16.match(/^collections\[(\d+)\](.*)$/);
139862
+ const collectionMatch = path17.match(/^collections\[(\d+)\](.*)$/);
139723
139863
  if (collectionMatch) {
139724
139864
  const [, collectionIndex, remainder] = collectionMatch;
139725
139865
  const collection = contextData.collections?.[parseInt(collectionIndex)];
@@ -139728,7 +139868,7 @@ ${messages.join("\n\n")}`;
139728
139868
  return `Collections "${collectionName}"${remainder}`;
139729
139869
  }
139730
139870
  }
139731
- const databaseMatch = path16.match(/^databases\[(\d+)\](.*)$/);
139871
+ const databaseMatch = path17.match(/^databases\[(\d+)\](.*)$/);
139732
139872
  if (databaseMatch) {
139733
139873
  const [, databaseIndex, remainder] = databaseMatch;
139734
139874
  const database = contextData.databases?.[parseInt(databaseIndex)];
@@ -139737,7 +139877,7 @@ ${messages.join("\n\n")}`;
139737
139877
  return `Databases "${databaseName}"${remainder}`;
139738
139878
  }
139739
139879
  }
139740
- const functionMatch = path16.match(/^functions\[(\d+)\](.*)$/);
139880
+ const functionMatch = path17.match(/^functions\[(\d+)\](.*)$/);
139741
139881
  if (functionMatch) {
139742
139882
  const [, functionIndex, remainder] = functionMatch;
139743
139883
  const func = contextData.functions?.[parseInt(functionIndex)];
@@ -139746,7 +139886,7 @@ ${messages.join("\n\n")}`;
139746
139886
  return `Functions "${functionName}"${remainder}`;
139747
139887
  }
139748
139888
  }
139749
- const siteMatch = path16.match(/^sites\[(\d+)\](.*)$/);
139889
+ const siteMatch = path17.match(/^sites\[(\d+)\](.*)$/);
139750
139890
  if (siteMatch) {
139751
139891
  const [, siteIndex, remainder] = siteMatch;
139752
139892
  const site = contextData.sites?.[parseInt(siteIndex)];
@@ -139755,7 +139895,7 @@ ${messages.join("\n\n")}`;
139755
139895
  return `Sites "${siteName}"${remainder}`;
139756
139896
  }
139757
139897
  }
139758
- const bucketMatch = path16.match(/^buckets\[(\d+)\](.*)$/);
139898
+ const bucketMatch = path17.match(/^buckets\[(\d+)\](.*)$/);
139759
139899
  if (bucketMatch) {
139760
139900
  const [, bucketIndex, remainder] = bucketMatch;
139761
139901
  const bucket = contextData.buckets?.[parseInt(bucketIndex)];
@@ -139764,7 +139904,7 @@ ${messages.join("\n\n")}`;
139764
139904
  return `Buckets "${bucketName}"${remainder}`;
139765
139905
  }
139766
139906
  }
139767
- const teamMatch = path16.match(/^teams\[(\d+)\](.*)$/);
139907
+ const teamMatch = path17.match(/^teams\[(\d+)\](.*)$/);
139768
139908
  if (teamMatch) {
139769
139909
  const [, teamIndex, remainder] = teamMatch;
139770
139910
  const team = contextData.teams?.[parseInt(teamIndex)];
@@ -139773,7 +139913,7 @@ ${messages.join("\n\n")}`;
139773
139913
  return `Teams "${teamName}"${remainder}`;
139774
139914
  }
139775
139915
  }
139776
- const topicMatch = path16.match(/^topics\[(\d+)\](.*)$/);
139916
+ const topicMatch = path17.match(/^topics\[(\d+)\](.*)$/);
139777
139917
  if (topicMatch) {
139778
139918
  const [, topicIndex, remainder] = topicMatch;
139779
139919
  const topic = contextData.topics?.[parseInt(topicIndex)];
@@ -139782,7 +139922,7 @@ ${messages.join("\n\n")}`;
139782
139922
  return `Topics "${topicName}"${remainder}`;
139783
139923
  }
139784
139924
  }
139785
- return path16;
139925
+ return path17;
139786
139926
  }
139787
139927
  static extractAllowedEnumValues(unionErrors) {
139788
139928
  const allowedValues = /* @__PURE__ */ new Set();
@@ -140876,8 +141016,18 @@ var DEPLOYMENT_TIMEOUT_MS = 10 * 60 * 1e3;
140876
141016
  var DEPLOYMENT_TIMEOUT_MINUTES = Math.round(
140877
141017
  DEPLOYMENT_TIMEOUT_MS / (60 * 1e3)
140878
141018
  );
141019
+ var SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS = 30 * 1e3;
141020
+ var SITE_SCREENSHOT_BUCKET_ID = "screenshots";
141021
+ var SITE_SCREENSHOT_PREVIEW_WIDTH = 480;
141022
+ var SITE_SCREENSHOT_PREVIEW_HEIGHT = 270;
141023
+ var SITE_TERMINAL_PREVIEW_TARGET_WIDTH = 72;
141024
+ var SITE_TERMINAL_PREVIEW_MAX_WIDTH = 80;
141025
+ var SITE_TERMINAL_PREVIEW_MAX_HEIGHT = 22;
141026
+ var SITE_TERMINAL_PREVIEW_MIN_HEIGHT = 8;
140879
141027
  var WAITING_JOKE_THRESHOLD_MS = 30 * 1e3;
140880
141028
  var WAITING_JOKE_URL = "https://xkcd.com/303/";
141029
+ var ANSI_RESET = "\x1B[0m";
141030
+ var terminalImageModulePromise;
140881
141031
  function getDeploymentProgressText(status, waitingSince) {
140882
141032
  if (status === "waiting" && waitingSince !== null && Date.now() - waitingSince >= WAITING_JOKE_THRESHOLD_MS) {
140883
141033
  return `Still waiting... ${WAITING_JOKE_URL}`;
@@ -140887,6 +141037,184 @@ function getDeploymentProgressText(status, waitingSince) {
140887
141037
  function getDeploymentTimeoutErrorMessage() {
140888
141038
  return `Deployment got stuck for more than ${DEPLOYMENT_TIMEOUT_MINUTES} minutes`;
140889
141039
  }
141040
+ async function getTerminalImage() {
141041
+ terminalImageModulePromise ??= import("terminal-image").then(
141042
+ (module2) => module2.default
141043
+ );
141044
+ return terminalImageModulePromise;
141045
+ }
141046
+ function getErrorMessage2(error49) {
141047
+ if (error49 instanceof Error && error49.message.trim().length > 0) {
141048
+ return error49.message.trim();
141049
+ }
141050
+ if (Array.isArray(error49)) {
141051
+ const messages = error49.map((entry) => getErrorMessage2(entry)).filter((entry) => entry !== "Unknown error");
141052
+ if (messages.length > 0) {
141053
+ return messages.join("; ");
141054
+ }
141055
+ }
141056
+ if (typeof error49 === "string" && error49.trim().length > 0) {
141057
+ return error49.trim();
141058
+ }
141059
+ if (error49 && typeof error49 === "object") {
141060
+ const objectMessage = Reflect.get(error49, "message");
141061
+ if (typeof objectMessage === "string" && objectMessage.trim().length > 0) {
141062
+ return objectMessage.trim();
141063
+ }
141064
+ try {
141065
+ return JSON.stringify(error49);
141066
+ } catch (_serializationError) {
141067
+ }
141068
+ }
141069
+ return "Unknown error";
141070
+ }
141071
+ function getSiteDeploymentScreenshots(deployment) {
141072
+ const screenshotLight = typeof deployment["screenshotLight"] === "string" && deployment["screenshotLight"].trim().length > 0 ? deployment["screenshotLight"] : void 0;
141073
+ const screenshotDark = typeof deployment["screenshotDark"] === "string" && deployment["screenshotDark"].trim().length > 0 ? deployment["screenshotDark"] : void 0;
141074
+ return {
141075
+ screenshotLight,
141076
+ screenshotDark
141077
+ };
141078
+ }
141079
+ function hasSiteDeploymentScreenshots(deployment) {
141080
+ const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(deployment);
141081
+ return Boolean(screenshotLight || screenshotDark);
141082
+ }
141083
+ function shouldRenderSiteTerminalPreview() {
141084
+ return Boolean(process.stdout.isTTY) && !cliConfig.json && !cliConfig.raw;
141085
+ }
141086
+ function getSiteTerminalPreviewWidth() {
141087
+ const columns = process.stdout.columns ?? 80;
141088
+ return Math.max(
141089
+ 16,
141090
+ Math.min(
141091
+ columns - 4,
141092
+ SITE_TERMINAL_PREVIEW_TARGET_WIDTH,
141093
+ SITE_TERMINAL_PREVIEW_MAX_WIDTH
141094
+ )
141095
+ );
141096
+ }
141097
+ function getSiteTerminalPreviewHeight() {
141098
+ const rows = process.stdout.rows ?? 24;
141099
+ return Math.max(
141100
+ SITE_TERMINAL_PREVIEW_MIN_HEIGHT,
141101
+ Math.min(rows - 10, SITE_TERMINAL_PREVIEW_MAX_HEIGHT)
141102
+ );
141103
+ }
141104
+ async function renderImageBufferToTerminalPreview(buffer) {
141105
+ const terminalImage = await getTerminalImage();
141106
+ const originalTermProgram = process.env.TERM_PROGRAM;
141107
+ const originalTermProgramVersion = process.env.TERM_PROGRAM_VERSION;
141108
+ const originalKonsoleVersion = process.env.KONSOLE_VERSION;
141109
+ const originalKittyWindowId = process.env.KITTY_WINDOW_ID;
141110
+ delete process.env.TERM_PROGRAM;
141111
+ delete process.env.TERM_PROGRAM_VERSION;
141112
+ delete process.env.KONSOLE_VERSION;
141113
+ delete process.env.KITTY_WINDOW_ID;
141114
+ try {
141115
+ return await terminalImage.buffer(buffer, {
141116
+ width: getSiteTerminalPreviewWidth(),
141117
+ height: getSiteTerminalPreviewHeight(),
141118
+ preserveAspectRatio: true
141119
+ });
141120
+ } finally {
141121
+ if (originalTermProgram === void 0) {
141122
+ delete process.env.TERM_PROGRAM;
141123
+ } else {
141124
+ process.env.TERM_PROGRAM = originalTermProgram;
141125
+ }
141126
+ if (originalTermProgramVersion === void 0) {
141127
+ delete process.env.TERM_PROGRAM_VERSION;
141128
+ } else {
141129
+ process.env.TERM_PROGRAM_VERSION = originalTermProgramVersion;
141130
+ }
141131
+ if (originalKonsoleVersion === void 0) {
141132
+ delete process.env.KONSOLE_VERSION;
141133
+ } else {
141134
+ process.env.KONSOLE_VERSION = originalKonsoleVersion;
141135
+ }
141136
+ if (originalKittyWindowId === void 0) {
141137
+ delete process.env.KITTY_WINDOW_ID;
141138
+ } else {
141139
+ process.env.KITTY_WINDOW_ID = originalKittyWindowId;
141140
+ }
141141
+ }
141142
+ }
141143
+ async function fetchSiteScreenshotPreview(params) {
141144
+ const previewUrl = params.renderer.storageService.getFilePreview({
141145
+ bucketId: SITE_SCREENSHOT_BUCKET_ID,
141146
+ fileId: params.fileId,
141147
+ width: SITE_SCREENSHOT_PREVIEW_WIDTH,
141148
+ height: SITE_SCREENSHOT_PREVIEW_HEIGHT,
141149
+ output: ImageFormat.Png
141150
+ });
141151
+ const imageData = await params.renderer.consoleClient.call(
141152
+ "get",
141153
+ new URL(previewUrl),
141154
+ {},
141155
+ {},
141156
+ "arrayBuffer"
141157
+ );
141158
+ if (!(imageData instanceof ArrayBuffer)) {
141159
+ throw new Error("Failed to download the site screenshot preview.");
141160
+ }
141161
+ return renderImageBufferToTerminalPreview(Buffer.from(imageData));
141162
+ }
141163
+ function frameTerminalPreview(preview) {
141164
+ const lines = preview.split("\n").map((line) => line.replace(/\s+$/, ""));
141165
+ while (lines.length > 0 && (0, import_node_util.stripVTControlCharacters)(lines[0]).trim().length === 0) {
141166
+ lines.shift();
141167
+ }
141168
+ while (lines.length > 0 && (0, import_node_util.stripVTControlCharacters)(lines[lines.length - 1]).trim().length === 0) {
141169
+ lines.pop();
141170
+ }
141171
+ if (lines.length === 0) {
141172
+ return "";
141173
+ }
141174
+ const contentWidth = Math.max(
141175
+ ...lines.map((line) => (0, import_node_util.stripVTControlCharacters)(line).length)
141176
+ );
141177
+ const border = `+-${"-".repeat(contentWidth)}-+`;
141178
+ return [
141179
+ border,
141180
+ ...lines.map((line) => {
141181
+ const visibleWidth = (0, import_node_util.stripVTControlCharacters)(line).length;
141182
+ return `| ${line}${ANSI_RESET}${" ".repeat(contentWidth - visibleWidth)} |`;
141183
+ }),
141184
+ border
141185
+ ].join("\n");
141186
+ }
141187
+ async function renderSiteTerminalPreview(params) {
141188
+ const warnings = /* @__PURE__ */ new Set();
141189
+ const candidates = [
141190
+ { fileId: params.screenshotDark, label: "dark" },
141191
+ { fileId: params.screenshotLight, label: "light" }
141192
+ ];
141193
+ for (const candidate of candidates) {
141194
+ const { fileId, label } = candidate;
141195
+ if (!fileId) {
141196
+ continue;
141197
+ }
141198
+ try {
141199
+ const preview = await fetchSiteScreenshotPreview({
141200
+ renderer: params.renderer,
141201
+ fileId
141202
+ });
141203
+ return {
141204
+ preview: frameTerminalPreview(preview),
141205
+ warnings: []
141206
+ };
141207
+ } catch (previewError) {
141208
+ warnings.add(
141209
+ `${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${getErrorMessage2(previewError)}`
141210
+ );
141211
+ }
141212
+ }
141213
+ return {
141214
+ preview: void 0,
141215
+ warnings: [...warnings]
141216
+ };
141217
+ }
140890
141218
  function withDeploymentLogsHint(message, deploymentLogsController) {
140891
141219
  const hint2 = deploymentLogsController.getToggleHint();
140892
141220
  return hint2.length > 0 ? `${message} \u2022 ${hint2}` : message;
@@ -141763,7 +142091,7 @@ var Push = class {
141763
142091
  deploymentLogsController
141764
142092
  )
141765
142093
  });
141766
- const timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
142094
+ let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
141767
142095
  while (true) {
141768
142096
  if (Date.now() > timeoutDeadline) {
141769
142097
  deploymentLogPrinter.complete();
@@ -142150,6 +142478,8 @@ var Push = class {
142150
142478
  deploymentId
142151
142479
  );
142152
142480
  let waitingSince = null;
142481
+ let readyWithoutScreenshotsSince = null;
142482
+ let activationApplied = false;
142153
142483
  const deploymentLogPrinter = createDeploymentLogPrinter({
142154
142484
  label: `site:${site.name}`,
142155
142485
  showPrefix: sites2.length > 1,
@@ -142189,7 +142519,7 @@ var Push = class {
142189
142519
  deploymentLogsController
142190
142520
  )
142191
142521
  });
142192
- const timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
142522
+ let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
142193
142523
  while (true) {
142194
142524
  if (Date.now() > timeoutDeadline) {
142195
142525
  deploymentLogPrinter.complete();
@@ -142223,7 +142553,9 @@ var Push = class {
142223
142553
  waitingSince = null;
142224
142554
  }
142225
142555
  if (status === "ready") {
142226
- if (activate) {
142556
+ const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(response);
142557
+ const screenshotsReady = hasSiteDeploymentScreenshots(response);
142558
+ if (activate && !activationApplied) {
142227
142559
  currentDeploymentEnd = "Setting active deployment...";
142228
142560
  updaterRow.update({
142229
142561
  status: "Activating",
@@ -142239,6 +142571,28 @@ var Push = class {
142239
142571
  siteId: site["$id"],
142240
142572
  deploymentId
142241
142573
  });
142574
+ activationApplied = true;
142575
+ }
142576
+ if (!screenshotsReady) {
142577
+ readyWithoutScreenshotsSince ??= Date.now();
142578
+ timeoutDeadline = Math.max(
142579
+ timeoutDeadline,
142580
+ readyWithoutScreenshotsSince + SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS
142581
+ );
142582
+ if (Date.now() - readyWithoutScreenshotsSince < SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS) {
142583
+ currentDeploymentEnd = "Finalizing deployment preview...";
142584
+ updaterRow.update({
142585
+ status: "Finalizing",
142586
+ end: withDeploymentLogsHint(
142587
+ currentDeploymentEnd,
142588
+ deploymentLogsController
142589
+ )
142590
+ });
142591
+ await new Promise(
142592
+ (resolve3) => setTimeout(resolve3, POLL_DEBOUNCE2)
142593
+ );
142594
+ continue;
142595
+ }
142242
142596
  }
142243
142597
  successfullyDeployed++;
142244
142598
  let url2 = "";
@@ -142265,7 +142619,14 @@ var Push = class {
142265
142619
  status: activate ? "Deployed" : "Built",
142266
142620
  end: ""
142267
142621
  });
142268
- deploymentLogs.push({ url: url2, consoleUrl });
142622
+ deploymentLogs.push({
142623
+ name: site.name,
142624
+ url: url2,
142625
+ consoleUrl,
142626
+ screenshotLight,
142627
+ screenshotDark,
142628
+ screenshotsPending: !screenshotsReady
142629
+ });
142269
142630
  break;
142270
142631
  } else if (status === "failed") {
142271
142632
  deploymentLogPrinter.complete();
@@ -142320,16 +142681,76 @@ var Push = class {
142320
142681
  Spinner.stop();
142321
142682
  }
142322
142683
  if (deploymentLogs.length > 0) {
142684
+ let sitePreviewRenderer = null;
142685
+ let sitePreviewSetupWarning = null;
142686
+ const emittedPreviewWarnings = /* @__PURE__ */ new Set();
142687
+ if (shouldRenderSiteTerminalPreview() && deploymentLogs.some(
142688
+ (deploymentLog) => deploymentLog.screenshotLight || deploymentLog.screenshotDark
142689
+ )) {
142690
+ try {
142691
+ const consoleClient = await sdkForConsole(
142692
+ true,
142693
+ localConfig.getEndpoint() || globalConfig2.getEndpoint()
142694
+ );
142695
+ sitePreviewRenderer = {
142696
+ consoleClient,
142697
+ storageService: await getStorageService(consoleClient)
142698
+ };
142699
+ } catch (previewSetupError) {
142700
+ sitePreviewSetupWarning = getErrorMessage2(previewSetupError);
142701
+ }
142702
+ }
142323
142703
  process.stdout.write("\n");
142324
- deploymentLogs.forEach((dl, index) => {
142704
+ for (const [index, dl] of deploymentLogs.entries()) {
142325
142705
  if (index > 0) {
142326
142706
  process.stdout.write("\n");
142327
142707
  }
142708
+ if (deploymentLogs.length > 1) {
142709
+ process.stdout.write(`${import_chalk13.default.cyan.bold(`Site: ${dl.name}`)}
142710
+ `);
142711
+ }
142712
+ if (dl.screenshotsPending) {
142713
+ hint(
142714
+ "Deployment is ready, but screenshot generation is still finalizing. Open the deployment page to view it once it is available."
142715
+ );
142716
+ }
142717
+ if (sitePreviewRenderer && (dl.screenshotLight || dl.screenshotDark)) {
142718
+ const preview = await renderSiteTerminalPreview({
142719
+ renderer: sitePreviewRenderer,
142720
+ screenshotLight: dl.screenshotLight,
142721
+ screenshotDark: dl.screenshotDark
142722
+ });
142723
+ if (preview.preview) {
142724
+ process.stdout.write(
142725
+ `
142726
+ ${import_chalk13.default.cyan.bold("Screenshot preview")}
142727
+
142728
+ `
142729
+ );
142730
+ process.stdout.write(`${preview.preview}
142731
+
142732
+ `);
142733
+ }
142734
+ for (const previewWarning of preview.warnings) {
142735
+ const warningMessage = `Screenshot preview unavailable: ${previewWarning}`;
142736
+ if (emittedPreviewWarnings.has(warningMessage)) {
142737
+ continue;
142738
+ }
142739
+ emittedPreviewWarnings.add(warningMessage);
142740
+ hint(warningMessage);
142741
+ }
142742
+ } else if (sitePreviewSetupWarning && (dl.screenshotLight || dl.screenshotDark)) {
142743
+ const warningMessage = `Screenshot preview unavailable: ${sitePreviewSetupWarning}`;
142744
+ if (!emittedPreviewWarnings.has(warningMessage)) {
142745
+ emittedPreviewWarnings.add(warningMessage);
142746
+ hint(warningMessage);
142747
+ }
142748
+ }
142328
142749
  if (dl.url) {
142329
142750
  this.log(`Preview link: ${import_chalk13.default.cyan(dl.url)}`);
142330
142751
  }
142331
142752
  this.log(`Deployment page: ${import_chalk13.default.cyan(dl.consoleUrl)}`);
142332
- });
142753
+ }
142333
142754
  process.stdout.write("\n");
142334
142755
  }
142335
142756
  return {
@@ -143475,37 +143896,74 @@ var deploy = new Command("deploy").description(`Removed. Use ${EXECUTABLE_NAME}
143475
143896
  );
143476
143897
 
143477
143898
  // lib/commands/update.ts
143899
+ var import_fs17 = __toESM(require("fs"), 1);
143900
+ var import_os7 = __toESM(require("os"), 1);
143901
+ var import_path16 = __toESM(require("path"), 1);
143478
143902
  var import_child_process4 = require("child_process");
143479
143903
  var import_chalk14 = __toESM(require_source(), 1);
143480
143904
  var import_inquirer8 = __toESM(require_inquirer(), 1);
143481
143905
  var { version: version2 } = package_default;
143482
- var isInstalledViaNpm = () => {
143906
+ var getStandaloneBinaryArtifactName = () => {
143907
+ const platform = process.platform === "win32" ? "win" : process.platform === "darwin" ? "darwin" : process.platform === "linux" ? "linux" : null;
143908
+ if (!platform) {
143909
+ throw new Error(
143910
+ `Standalone binary updates are not supported on ${process.platform}.`
143911
+ );
143912
+ }
143913
+ const arch = import_os7.default.arch();
143914
+ if (arch !== "x64" && arch !== "arm64") {
143915
+ throw new Error(
143916
+ `Standalone binary updates are not supported on ${arch} architecture.`
143917
+ );
143918
+ }
143919
+ const extension = platform === "win" ? ".exe" : "";
143920
+ return `${NPM_PACKAGE_NAME}-${platform}-${arch}${extension}`;
143921
+ };
143922
+ var getStandaloneBinaryTargetPath = () => {
143923
+ const execPath = process.execPath;
143483
143924
  try {
143484
- const scriptPath = process.argv[1];
143485
- if (scriptPath.includes("node_modules") && scriptPath.includes(NPM_PACKAGE_NAME)) {
143486
- return true;
143487
- }
143488
- if (scriptPath.includes("/usr/local/lib/node_modules/") || scriptPath.includes("/opt/homebrew/lib/node_modules/") || scriptPath.includes("/.npm-global/") || scriptPath.includes("/node_modules/.bin/") || scriptPath.includes("/.nvm/versions/node/")) {
143489
- return true;
143925
+ if (import_fs17.default.lstatSync(execPath).isSymbolicLink()) {
143926
+ return import_fs17.default.realpathSync.native(execPath);
143490
143927
  }
143491
- return false;
143492
- } catch (_e2) {
143493
- return false;
143928
+ } catch (_error) {
143494
143929
  }
143930
+ return execPath;
143495
143931
  };
143496
- var isInstalledViaHomebrew = () => {
143932
+ var isExpectedStandaloneBinaryPath = (candidatePath) => {
143933
+ const basename = import_path16.default.basename(candidatePath).toLowerCase();
143934
+ const expectedName = EXECUTABLE_NAME.toLowerCase();
143935
+ return basename === expectedName || basename === `${expectedName}.exe`;
143936
+ };
143937
+ var isDirectoryWritable = (directoryPath) => {
143497
143938
  try {
143498
- const scriptPath = process.argv[1];
143499
- return scriptPath.includes("/opt/homebrew/") || scriptPath.includes("/usr/local/Cellar/") || scriptPath.includes("/home/linuxbrew/.linuxbrew/") || scriptPath.includes("/linuxbrew/.linuxbrew/");
143500
- } catch (_e2) {
143939
+ import_fs17.default.accessSync(directoryPath, import_fs17.default.constants.W_OK);
143940
+ return true;
143941
+ } catch (_error) {
143501
143942
  return false;
143502
143943
  }
143503
143944
  };
143945
+ var quoteShellArgument = (value) => {
143946
+ return `'${value.replace(/'/g, `'\\''`)}'`;
143947
+ };
143948
+ var downloadStandaloneBinary = async (destinationPath) => {
143949
+ const artifact = getStandaloneBinaryArtifactName();
143950
+ const response = await fetch(`${GITHUB_RELEASES_URL}/latest/download/${artifact}`);
143951
+ if (!response.ok) {
143952
+ throw new Error(
143953
+ `Failed to download standalone binary (HTTP ${response.status}).`
143954
+ );
143955
+ }
143956
+ const body = Buffer.from(await response.arrayBuffer());
143957
+ import_fs17.default.writeFileSync(destinationPath, body);
143958
+ if (process.platform !== "win32") {
143959
+ import_fs17.default.chmodSync(destinationPath, 493);
143960
+ }
143961
+ };
143504
143962
  var execCommand = (command, args = [], options = {}) => {
143505
143963
  return new Promise((resolve3, reject) => {
143506
143964
  const child = (0, import_child_process4.spawn)(command, args, {
143507
143965
  stdio: "inherit",
143508
- shell: true,
143966
+ shell: process.platform === "win32",
143509
143967
  ...options
143510
143968
  });
143511
143969
  child.on("close", (code) => {
@@ -143558,6 +144016,51 @@ var updateViaHomebrew = async () => {
143558
144016
  }
143559
144017
  }
143560
144018
  };
144019
+ var updateViaStandaloneBinary = async (latestVersion) => {
144020
+ if (process.platform === "win32") {
144021
+ showManualInstructions(latestVersion);
144022
+ return;
144023
+ }
144024
+ const targetPath = getStandaloneBinaryTargetPath();
144025
+ if (!isExpectedStandaloneBinaryPath(targetPath)) {
144026
+ console.log("");
144027
+ error48("Could not determine the standalone binary path.");
144028
+ hint(`Download the latest release manually at: ${GITHUB_RELEASES_URL}`);
144029
+ return;
144030
+ }
144031
+ const targetDir = import_path16.default.dirname(targetPath);
144032
+ const tempName = `${import_path16.default.basename(targetPath)}.tmp-${process.pid}`;
144033
+ const writableDirectory = isDirectoryWritable(targetDir);
144034
+ const tempPath = writableDirectory ? import_path16.default.join(targetDir, tempName) : import_path16.default.join(import_os7.default.tmpdir(), tempName);
144035
+ try {
144036
+ await downloadStandaloneBinary(tempPath);
144037
+ if (writableDirectory) {
144038
+ import_fs17.default.renameSync(tempPath, targetPath);
144039
+ } else {
144040
+ const stagedTargetPath = import_path16.default.join(targetDir, tempName);
144041
+ const command = [
144042
+ `install -m 755 ${quoteShellArgument(tempPath)} ${quoteShellArgument(stagedTargetPath)}`,
144043
+ `mv -f ${quoteShellArgument(stagedTargetPath)} ${quoteShellArgument(targetPath)}`
144044
+ ].join(" && ");
144045
+ await execCommand("sudo", ["sh", "-c", command]);
144046
+ }
144047
+ console.log("");
144048
+ success2("Updated to latest version via standalone binary!");
144049
+ hint("Run 'appwrite --version' to verify the new version.");
144050
+ } catch (e) {
144051
+ const message = getErrorMessage(e);
144052
+ console.log("");
144053
+ error48(`Failed to update standalone binary: ${message}`);
144054
+ hint(`Download the latest release manually at: ${GITHUB_RELEASES_URL}`);
144055
+ } finally {
144056
+ try {
144057
+ if (import_fs17.default.existsSync(tempPath)) {
144058
+ import_fs17.default.unlinkSync(tempPath);
144059
+ }
144060
+ } catch (_error) {
144061
+ }
144062
+ }
144063
+ };
143561
144064
  var showManualInstructions = (latestVersion) => {
143562
144065
  log("Manual update options:");
143563
144066
  console.log("");
@@ -143567,13 +144070,38 @@ var showManualInstructions = (latestVersion) => {
143567
144070
  log(`${import_chalk14.default.bold("Option 2: Homebrew")}`);
143568
144071
  console.log(` brew upgrade appwrite`);
143569
144072
  console.log("");
143570
- log(`${import_chalk14.default.bold("Option 3: Download Binary")}`);
143571
- console.log(` Visit: ${GITHUB_RELEASES_URL}/tag/${latestVersion}`);
144073
+ if (process.platform !== "win32") {
144074
+ try {
144075
+ const artifact = getStandaloneBinaryArtifactName();
144076
+ const targetPath = getStandaloneBinaryTargetPath();
144077
+ if (!isExpectedStandaloneBinaryPath(targetPath)) {
144078
+ throw new Error("Could not determine the standalone binary path.");
144079
+ }
144080
+ const tempPath = import_path16.default.join(import_os7.default.tmpdir(), import_path16.default.basename(targetPath));
144081
+ log(`${import_chalk14.default.bold("Option 3: Install Script / Standalone Binary")}`);
144082
+ console.log(
144083
+ ` curl -fsSL ${GITHUB_RELEASES_URL}/latest/download/${artifact} -o ${tempPath}`
144084
+ );
144085
+ console.log(` chmod +x ${tempPath}`);
144086
+ console.log(` sudo mv -f ${tempPath} ${targetPath}`);
144087
+ console.log("");
144088
+ } catch (_error) {
144089
+ }
144090
+ }
144091
+ log(`${import_chalk14.default.bold("Option 4: Download Binary")}`);
144092
+ console.log(` Visit: ${GITHUB_RELEASES_URL}/latest`);
143572
144093
  };
143573
144094
  var chooseUpdateMethod = async (latestVersion) => {
144095
+ const canOfferStandaloneUpdate = process.platform !== "win32" && isExpectedStandaloneBinaryPath(getStandaloneBinaryTargetPath());
143574
144096
  const choices = [
143575
144097
  { name: "NPM", value: "npm" },
143576
144098
  { name: "Homebrew", value: "homebrew" },
144099
+ ...!canOfferStandaloneUpdate ? [] : [
144100
+ {
144101
+ name: "Install script / standalone binary",
144102
+ value: "standalone"
144103
+ }
144104
+ ],
143577
144105
  { name: "Show manual instructions", value: "manual" }
143578
144106
  ];
143579
144107
  const { method } = await import_inquirer8.default.prompt([
@@ -143591,6 +144119,9 @@ var chooseUpdateMethod = async (latestVersion) => {
143591
144119
  case "homebrew":
143592
144120
  await updateViaHomebrew();
143593
144121
  break;
144122
+ case "standalone":
144123
+ await updateViaStandaloneBinary(latestVersion);
144124
+ break;
143594
144125
  case "manual":
143595
144126
  showManualInstructions(latestVersion);
143596
144127
  break;
@@ -143598,7 +144129,10 @@ var chooseUpdateMethod = async (latestVersion) => {
143598
144129
  };
143599
144130
  var updateCli = async ({ manual } = {}) => {
143600
144131
  try {
143601
- const latestVersion = await getLatestVersion();
144132
+ const installationMethod = detectInstallationMethod();
144133
+ const latestVersion = await getLatestVersionForInstallation(
144134
+ installationMethod
144135
+ );
143602
144136
  const comparison = compareVersions(version2, latestVersion);
143603
144137
  if (comparison === 0) {
143604
144138
  success2(
@@ -143620,12 +144154,19 @@ var updateCli = async ({ manual } = {}) => {
143620
144154
  showManualInstructions(latestVersion);
143621
144155
  return;
143622
144156
  }
143623
- if (isInstalledViaNpm()) {
143624
- await updateViaNpm();
143625
- } else if (isInstalledViaHomebrew()) {
143626
- await updateViaHomebrew();
143627
- } else {
143628
- await chooseUpdateMethod(latestVersion);
144157
+ switch (installationMethod) {
144158
+ case "npm":
144159
+ await updateViaNpm();
144160
+ break;
144161
+ case "homebrew":
144162
+ await updateViaHomebrew();
144163
+ break;
144164
+ case "standalone":
144165
+ await updateViaStandaloneBinary(latestVersion);
144166
+ break;
144167
+ default:
144168
+ await chooseUpdateMethod(latestVersion);
144169
+ break;
143629
144170
  }
143630
144171
  } catch (e) {
143631
144172
  const message = getErrorMessage(e);
@@ -143640,11 +144181,11 @@ var update = new Command("update").description(`Update the ${SDK_TITLE} CLI to t
143640
144181
  ).action(actionRunner(updateCli));
143641
144182
 
143642
144183
  // lib/commands/generate.ts
143643
- var path15 = __toESM(require("path"), 1);
144184
+ var path16 = __toESM(require("path"), 1);
143644
144185
 
143645
144186
  // lib/commands/generators/language-detector.ts
143646
- var fs15 = __toESM(require("fs"), 1);
143647
- var path13 = __toESM(require("path"), 1);
144187
+ var fs16 = __toESM(require("fs"), 1);
144188
+ var path14 = __toESM(require("path"), 1);
143648
144189
  var languageConfigs = [
143649
144190
  {
143650
144191
  language: "typescript",
@@ -143732,14 +144273,14 @@ var LanguageDetector = class {
143732
144273
  * Check if a file exists in the project directory.
143733
144274
  */
143734
144275
  fileExists(filename) {
143735
- return fs15.existsSync(path13.resolve(this.cwd, filename));
144276
+ return fs16.existsSync(path14.resolve(this.cwd, filename));
143736
144277
  }
143737
144278
  /**
143738
144279
  * Check if files with specific extensions exist in the current directory.
143739
144280
  */
143740
144281
  hasFilesWithExtensions(extensions) {
143741
144282
  try {
143742
- const files = fs15.readdirSync(this.cwd);
144283
+ const files = fs16.readdirSync(this.cwd);
143743
144284
  return files.some((file2) => extensions.some((ext) => file2.endsWith(ext)));
143744
144285
  } catch {
143745
144286
  return false;
@@ -143763,13 +144304,13 @@ var LanguageDetector = class {
143763
144304
  var import_handlebars = __toESM(require_lib3(), 1);
143764
144305
 
143765
144306
  // lib/commands/generators/base.ts
143766
- var fs16 = __toESM(require("fs"), 1);
143767
- var path14 = __toESM(require("path"), 1);
144307
+ var fs17 = __toESM(require("fs"), 1);
144308
+ var path15 = __toESM(require("path"), 1);
143768
144309
  var BaseDatabasesGenerator = class {
143769
144310
  async writeFiles(outputDir, result) {
143770
- const sdkDir = path14.join(outputDir, SDK_TITLE_LOWER);
143771
- if (!fs16.existsSync(sdkDir)) {
143772
- fs16.mkdirSync(sdkDir, { recursive: true });
144311
+ const sdkDir = path15.join(outputDir, SDK_TITLE_LOWER);
144312
+ if (!fs17.existsSync(sdkDir)) {
144313
+ fs17.mkdirSync(sdkDir, { recursive: true });
143773
144314
  }
143774
144315
  const fileEntries = [
143775
144316
  ["databases.ts", result.dbContent],
@@ -143778,29 +144319,29 @@ var BaseDatabasesGenerator = class {
143778
144319
  ["constants.ts", result.constantsContent]
143779
144320
  ];
143780
144321
  for (const [relativePath, content] of fileEntries) {
143781
- const filePath = path14.join(sdkDir, relativePath);
143782
- const fileDir = path14.dirname(filePath);
143783
- if (!fs16.existsSync(fileDir)) {
143784
- fs16.mkdirSync(fileDir, { recursive: true });
144322
+ const filePath = path15.join(sdkDir, relativePath);
144323
+ const fileDir = path15.dirname(filePath);
144324
+ if (!fs17.existsSync(fileDir)) {
144325
+ fs17.mkdirSync(fileDir, { recursive: true });
143785
144326
  }
143786
- if (relativePath === "constants.ts" && fs16.existsSync(filePath)) {
144327
+ if (relativePath === "constants.ts" && fs17.existsSync(filePath)) {
143787
144328
  continue;
143788
144329
  }
143789
- fs16.writeFileSync(filePath, content, "utf-8");
144330
+ fs17.writeFileSync(filePath, content, "utf-8");
143790
144331
  }
143791
144332
  }
143792
144333
  getGeneratedFilePaths(_result) {
143793
144334
  return [
143794
- path14.join(SDK_TITLE_LOWER, "databases.ts"),
143795
- path14.join(SDK_TITLE_LOWER, "types.ts"),
143796
- path14.join(SDK_TITLE_LOWER, "index.ts"),
143797
- path14.join(SDK_TITLE_LOWER, "constants.ts")
144335
+ path15.join(SDK_TITLE_LOWER, "databases.ts"),
144336
+ path15.join(SDK_TITLE_LOWER, "types.ts"),
144337
+ path15.join(SDK_TITLE_LOWER, "index.ts"),
144338
+ path15.join(SDK_TITLE_LOWER, "constants.ts")
143798
144339
  ];
143799
144340
  }
143800
144341
  };
143801
144342
 
143802
144343
  // lib/commands/generators/typescript/templates/types.ts.hbs
143803
- var types_ts_default = "import { type Models } from '{{appwriteDep}}';\n\n{{{ENUMS}}}{{{TYPES}}}\ndeclare const __roleStringBrand: unique symbol;\nexport type RoleString = string & { readonly [__roleStringBrand]: never };\n\nexport type RoleBuilder = {\n any: () => RoleString;\n user: (userId: string, status?: string) => RoleString;\n users: (status?: string) => RoleString;\n guests: () => RoleString;\n team: (teamId: string, role?: string) => RoleString;\n member: (memberId: string) => RoleString;\n label: (label: string) => RoleString;\n}\n\nexport type PermissionBuilder = {\n read: (role: RoleString) => string;\n write: (role: RoleString) => string;\n create: (role: RoleString) => string;\n update: (role: RoleString) => string;\n delete: (role: RoleString) => string;\n}\n\nexport type PermissionCallback = (permission: PermissionBuilder, role: RoleBuilder) => string[];\n\nexport type QueryValue = string | number | boolean;\n\nexport type ExtractQueryValue<T> = T extends (infer U)[]\n ? U extends QueryValue ? U : never\n : T extends QueryValue | null ? NonNullable<T> : never;\n\nexport type QueryableKeys<T> = {\n [K in keyof T]: ExtractQueryValue<T[K]> extends never ? never : K;\n}[keyof T];\n\nexport type QueryBuilder<T> = {\n equal: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n notEqual: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n lessThan: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n lessThanEqual: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n greaterThan: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n greaterThanEqual: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n contains: <K extends QueryableKeys<T>>(field: K, value: ExtractQueryValue<T[K]>) => string;\n search: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n isNull: <K extends QueryableKeys<T>>(field: K) => string;\n isNotNull: <K extends QueryableKeys<T>>(field: K) => string;\n startsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n endsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n between: <K extends QueryableKeys<T>>(field: K, start: ExtractQueryValue<T[K]>, end: ExtractQueryValue<T[K]>) => string;\n select: <K extends keyof T>(fields: K[]) => string;\n orderAsc: <K extends keyof T>(field: K) => string;\n orderDesc: <K extends keyof T>(field: K) => string;\n limit: (value: number) => string;\n offset: (value: number) => string;\n cursorAfter: (documentId: string) => string;\n cursorBefore: (documentId: string) => string;\n or: (...queries: string[]) => string;\n and: (...queries: string[]) => string;\n}\n\nexport type DatabaseId = {{{databaseIdType}}};\n\n{{{DATABASE_TABLES_TYPE}}}\n";
144344
+ var types_ts_default = "import { type Models } from '{{appwriteDep}}';\n\n{{{ENUMS}}}{{{TYPES}}}\ndeclare const __roleStringBrand: unique symbol;\nexport type RoleString = string & { readonly [__roleStringBrand]: never };\n\nexport type RoleBuilder = {\n any: () => RoleString;\n user: (userId: string, status?: string) => RoleString;\n users: (status?: string) => RoleString;\n guests: () => RoleString;\n team: (teamId: string, role?: string) => RoleString;\n member: (memberId: string) => RoleString;\n label: (label: string) => RoleString;\n}\n\nexport type PermissionBuilder = {\n read: (role: RoleString) => string;\n write: (role: RoleString) => string;\n create: (role: RoleString) => string;\n update: (role: RoleString) => string;\n delete: (role: RoleString) => string;\n}\n\nexport type PermissionCallback = (permission: PermissionBuilder, role: RoleBuilder) => string[];\n\nexport type QueryValue = string | number | boolean;\n\nexport type ExtractQueryValue<T> = T extends (infer U)[]\n ? U extends QueryValue ? U : never\n : T extends QueryValue | null ? NonNullable<T> : never;\n\nexport type QueryableKeys<T> = {\n [K in keyof T]: ExtractQueryValue<T[K]> extends never ? never : K;\n}[keyof T];\n\nexport type QueryableFieldValue<T, K> = K extends keyof T\n ? ExtractQueryValue<T[K]>\n : never;\n\nexport type QueryBuilder<T> = {\n equal: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n notEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n lessThan: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n lessThanEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n greaterThan: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n greaterThanEqual: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n contains: <K extends QueryableKeys<T>>(field: K, value: QueryableFieldValue<T, K>) => string;\n search: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n isNull: <K extends QueryableKeys<T>>(field: K) => string;\n isNotNull: <K extends QueryableKeys<T>>(field: K) => string;\n startsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n endsWith: <K extends QueryableKeys<T>>(field: K, value: string) => string;\n between: <K extends QueryableKeys<T>>(field: K, start: QueryableFieldValue<T, K>, end: QueryableFieldValue<T, K>) => string;\n select: <K extends keyof T>(fields: K[]) => string;\n orderAsc: <K extends keyof T>(field: K) => string;\n orderDesc: <K extends keyof T>(field: K) => string;\n limit: (value: number) => string;\n offset: (value: number) => string;\n cursorAfter: (documentId: string) => string;\n cursorBefore: (documentId: string) => string;\n or: (...queries: string[]) => string;\n and: (...queries: string[]) => string;\n}\n\nexport type DatabaseId = {{{databaseIdType}}};\n\n{{{DATABASE_TABLES_TYPE}}}\n";
143804
144345
 
143805
144346
  // lib/commands/generators/typescript/templates/databases.ts.hbs
143806
144347
  var databases_ts_default = 'import { Client, TablesDB, ID, Query, type Models, Permission, Role } from \'{{appwriteDep}}\';\nimport type { DatabaseHandle, DatabaseId, DatabaseTableMap, DatabaseTables, QueryBuilder, QueryValue, PermissionBuilder, RoleBuilder, RoleString } from \'./types{{importExt}}\';\n{{#if supportsServerSide}}\nimport { PROJECT_ID, ENDPOINT, API_KEY } from \'./constants{{importExt}}\';\n{{else}}\nimport { PROJECT_ID, ENDPOINT } from \'./constants{{importExt}}\';\n{{/if}}\n\nconst createQueryBuilder = <T>(): QueryBuilder<T> => ({\n equal: (field, value) => Query.equal(String(field), value as QueryValue),\n notEqual: (field, value) => Query.notEqual(String(field), value as QueryValue),\n lessThan: (field, value) => Query.lessThan(String(field), value as QueryValue),\n lessThanEqual: (field, value) => Query.lessThanEqual(String(field), value as QueryValue),\n greaterThan: (field, value) => Query.greaterThan(String(field), value as QueryValue),\n greaterThanEqual: (field, value) => Query.greaterThanEqual(String(field), value as QueryValue),\n contains: (field, value) => Query.contains(String(field), value as string | QueryValue[]),\n search: (field, value) => Query.search(String(field), value),\n isNull: (field) => Query.isNull(String(field)),\n isNotNull: (field) => Query.isNotNull(String(field)),\n startsWith: (field, value) => Query.startsWith(String(field), value),\n endsWith: (field, value) => Query.endsWith(String(field), value),\n between: (field, start, end) => Query.between(String(field), start as string | number, end as string | number),\n select: (fields) => Query.select(fields.map(String)),\n orderAsc: (field) => Query.orderAsc(String(field)),\n orderDesc: (field) => Query.orderDesc(String(field)),\n limit: (value) => Query.limit(value),\n offset: (value) => Query.offset(value),\n cursorAfter: (documentId) => Query.cursorAfter(documentId),\n cursorBefore: (documentId) => Query.cursorBefore(documentId),\n or: (...queries) => Query.or(queries),\n and: (...queries) => Query.and(queries),\n});\n\n{{{TABLE_ID_MAP}}}\n\n{{{TABLES_WITH_RELATIONSHIPS}}}\n\nconst roleBuilder: RoleBuilder = {\n any: () => Role.any() as RoleString,\n user: (userId, status?) => Role.user(userId, status) as RoleString,\n users: (status?) => Role.users(status) as RoleString,\n guests: () => Role.guests() as RoleString,\n team: (teamId, role?) => Role.team(teamId, role) as RoleString,\n member: (memberId) => Role.member(memberId) as RoleString,\n label: (label) => Role.label(label) as RoleString,\n};\n\nconst permissionBuilder: PermissionBuilder = {\n read: (role) => Permission.read(role),\n write: (role) => Permission.write(role),\n create: (role) => Permission.create(role),\n update: (role) => Permission.update(role),\n delete: (role) => Permission.delete(role),\n};\n\nconst resolvePermissions = (callback?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]): string[] | undefined =>\n callback?.(permissionBuilder, roleBuilder);\n\nfunction createTableApi<T extends Models.Row>(\n tablesDB: TablesDB,\n databaseId: string,\n tableId: string,\n) {\n return {\n create: (data: Omit<T, keyof Models.Row>, options?: { rowId?: string; permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; transactionId?: string }) =>\n tablesDB.createRow<T>({\n databaseId,\n tableId,\n rowId: options?.rowId ?? ID.unique(),\n data: data as T extends Models.DefaultRow ? Partial<Models.Row> & Record<string, unknown> : Partial<Models.Row> & Omit<T, keyof Models.Row>,\n permissions: resolvePermissions(options?.permissions),\n transactionId: options?.transactionId,\n }),\n get: (id: string) =>\n tablesDB.getRow<T>({\n databaseId,\n tableId,\n rowId: id,\n }),\n update: (id: string, data: Partial<Omit<T, keyof Models.Row>>, options?: { permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; transactionId?: string }) =>\n tablesDB.updateRow<T>({\n databaseId,\n tableId,\n rowId: id,\n data: data as T extends Models.DefaultRow ? Partial<Models.Row> & Record<string, unknown> : Partial<Models.Row> & Partial<Omit<T, keyof Models.Row>>,\n ...(options?.permissions ? { permissions: resolvePermissions(options.permissions) } : {}),\n transactionId: options?.transactionId,\n }),\n delete: async (id: string, options?: { transactionId?: string }) => {\n await tablesDB.deleteRow({\n databaseId,\n tableId,\n rowId: id,\n transactionId: options?.transactionId,\n });\n },\n list: (options?: { queries?: (q: QueryBuilder<T>) => string[] }) =>\n tablesDB.listRows<T>({\n databaseId,\n tableId,\n queries: options?.queries?.(createQueryBuilder<T>()),\n }),{{{BULK_METHODS}}}\n };\n}\n\n{{{BULK_CHECK}}}\nconst hasOwn = (obj: unknown, key: string): boolean =>\n obj != null && Object.prototype.hasOwnProperty.call(obj, key);\n\nfunction createDatabaseHandle<D extends DatabaseId>(\n tablesDB: TablesDB,\n databaseId: D,\n): DatabaseHandle<D> {\n const tableApiCache = new Map<string, unknown>();\n const dbMap = tableIdMap[databaseId];\n\n return {\n use: <T extends keyof DatabaseTableMap[D] & string>(tableId: T): DatabaseTableMap[D][T] => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n\n if (!tableApiCache.has(tableId)) {\n const resolvedTableId = dbMap[tableId];\n const api = createTableApi(tablesDB, databaseId, resolvedTableId);\n {{{BULK_REMOVAL}}}\n tableApiCache.set(tableId, api);\n }\n return tableApiCache.get(tableId) as DatabaseTableMap[D][T];\n },\n{{#if supportsServerSide}}\n create: (tableId: string, name: string, options?: { permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; rowSecurity?: boolean; enabled?: boolean; columns?: object[]; indexes?: object[] }) =>\n tablesDB.createTable({\n databaseId,\n tableId,\n name,\n permissions: resolvePermissions(options?.permissions),\n rowSecurity: options?.rowSecurity,\n enabled: options?.enabled,\n columns: options?.columns,\n indexes: options?.indexes,\n }),\n update: (tableId: string, options?: { name?: string; permissions?: (permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]; rowSecurity?: boolean; enabled?: boolean }) => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n const resolvedTableId = dbMap[tableId];\n return tablesDB.updateTable({\n databaseId,\n tableId: resolvedTableId,\n name: options?.name,\n permissions: resolvePermissions(options?.permissions),\n rowSecurity: options?.rowSecurity,\n enabled: options?.enabled,\n });\n },\n delete: async (tableId: string) => {\n if (!hasOwn(dbMap, tableId)) {\n throw new Error(`Unknown table "${tableId}" in database "${databaseId}"`);\n }\n const resolvedTableId = dbMap[tableId];\n await tablesDB.deleteTable({\n databaseId,\n tableId: resolvedTableId,\n });\n },\n{{/if}}\n };\n}\n\nfunction createDatabasesApi(tablesDB: TablesDB): DatabaseTables {\n const dbCache = new Map<DatabaseId, ReturnType<typeof createDatabaseHandle>>();\n\n return {\n use: (databaseId: DatabaseId) => {\n if (!hasOwn(tableIdMap, databaseId)) {\n throw new Error(`Unknown database "${databaseId}"`);\n }\n\n if (!dbCache.has(databaseId)) {\n dbCache.set(databaseId, createDatabaseHandle(tablesDB, databaseId));\n }\n return dbCache.get(databaseId);\n },\n{{#if supportsServerSide}}\n create: (databaseId: string, name: string, options?: { enabled?: boolean }) =>\n tablesDB.create({\n databaseId,\n name,\n enabled: options?.enabled,\n }),\n update: (databaseId: DatabaseId, options?: { name?: string; enabled?: boolean }) => {\n return tablesDB.update({\n databaseId,\n name: options?.name ?? databaseId,\n enabled: options?.enabled,\n });\n },\n delete: async (databaseId: DatabaseId) => {\n await tablesDB.delete({\n databaseId,\n });\n },\n{{/if}}\n } as DatabaseTables;\n}\n\n// Initialize client\nconst client = new Client()\n .setEndpoint(ENDPOINT)\n .setProject(PROJECT_ID){{#if supportsServerSide}}\n .setKey(API_KEY){{/if}};\n\nconst tablesDB = new TablesDB(client);\n\nexport const databases: DatabaseTables = createDatabasesApi(tablesDB);\n';
@@ -143817,7 +144358,7 @@ var databasesTemplate = import_handlebars.default.compile(String(databases_ts_de
143817
144358
  var indexTemplate = import_handlebars.default.compile(String(index_ts_default));
143818
144359
  var constantsTemplate = import_handlebars.default.compile(String(constants_ts_default));
143819
144360
  var PERMISSION_CALLBACK_INLINE = `(permission: { read: (role: RoleString) => string; write: (role: RoleString) => string; create: (role: RoleString) => string; update: (role: RoleString) => string; delete: (role: RoleString) => string }, role: { any: () => RoleString; user: (userId: string, status?: string) => RoleString; users: (status?: string) => RoleString; guests: () => RoleString; team: (teamId: string, role?: string) => RoleString; member: (memberId: string) => RoleString; label: (label: string) => RoleString }) => string[]`;
143820
- var getQueryCallbackInline = (typeName) => `(q: { equal: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; notEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; lessThan: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; lessThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; greaterThan: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; greaterThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; contains: <K extends QueryableKeys<${typeName}>>(field: K, value: ExtractQueryValue<${typeName}[K]>) => string; search: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; isNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; isNotNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; startsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; endsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; between: <K extends QueryableKeys<${typeName}>>(field: K, start: ExtractQueryValue<${typeName}[K]>, end: ExtractQueryValue<${typeName}[K]>) => string; select: <K extends keyof ${typeName}>(fields: K[]) => string; orderAsc: <K extends keyof ${typeName}>(field: K) => string; orderDesc: <K extends keyof ${typeName}>(field: K) => string; limit: (value: number) => string; offset: (value: number) => string; cursorAfter: (documentId: string) => string; cursorBefore: (documentId: string) => string; or: (...queries: string[]) => string; and: (...queries: string[]) => string }) => string[]`;
144361
+ var getQueryCallbackInline = (typeName) => `(q: { equal: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; notEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; lessThan: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; lessThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; greaterThan: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; greaterThanEqual: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; contains: <K extends QueryableKeys<${typeName}>>(field: K, value: QueryableFieldValue<${typeName}, K>) => string; search: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; isNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; isNotNull: <K extends QueryableKeys<${typeName}>>(field: K) => string; startsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; endsWith: <K extends QueryableKeys<${typeName}>>(field: K, value: string) => string; between: <K extends QueryableKeys<${typeName}>>(field: K, start: QueryableFieldValue<${typeName}, K>, end: QueryableFieldValue<${typeName}, K>) => string; select: <K extends keyof ${typeName}>(fields: K[]) => string; orderAsc: <K extends keyof ${typeName}>(field: K) => string; orderDesc: <K extends keyof ${typeName}>(field: K) => string; limit: (value: number) => string; offset: (value: number) => string; cursorAfter: (documentId: string) => string; cursorBefore: (documentId: string) => string; or: (...queries: string[]) => string; and: (...queries: string[]) => string }) => string[]`;
143821
144362
  var TypeScriptDatabasesGenerator = class extends BaseDatabasesGenerator {
143822
144363
  language = "typescript";
143823
144364
  fileExtension = "ts";
@@ -144265,7 +144806,7 @@ Use --language to specify the target language. Supported: ${supported}`
144265
144806
  collections: localConfig.getCollections()
144266
144807
  };
144267
144808
  const outputDir = options.output;
144268
- const absoluteOutputDir = path15.isAbsolute(outputDir) ? outputDir : path15.join(process.cwd(), outputDir);
144809
+ const absoluteOutputDir = path16.isAbsolute(outputDir) ? outputDir : path16.join(process.cwd(), outputDir);
144269
144810
  log(
144270
144811
  `Generating type-safe ${detectedLanguage} SDK to ${absoluteOutputDir}...`
144271
144812
  );
@@ -144278,7 +144819,7 @@ Use --language to specify the target language. Supported: ${supported}`
144278
144819
  const generatedFiles = generator.getGeneratedFilePaths(result);
144279
144820
  success2(`Generated files:`);
144280
144821
  for (const file2 of generatedFiles) {
144281
- console.log(` - ${path15.join(outputDir, file2)}`);
144822
+ console.log(` - ${path16.join(outputDir, file2)}`);
144282
144823
  }
144283
144824
  if (detectedLanguage === "typescript") {
144284
144825
  const entities = config2.tables?.length ? config2.tables : config2.collections;
@@ -145344,7 +145885,7 @@ var databasesGetUsageCommand = databases.command(`get-usage`).description(`Get u
145344
145885
  );
145345
145886
 
145346
145887
  // lib/commands/services/functions.ts
145347
- var import_fs17 = __toESM(require("fs"), 1);
145888
+ var import_fs18 = __toESM(require("fs"), 1);
145348
145889
  var functionsClient = null;
145349
145890
  var getFunctionsClient = async () => {
145350
145891
  if (!functionsClient) {
@@ -145504,7 +146045,7 @@ var functionsGetDeploymentDownloadCommand = functions.command(`get-deployment-do
145504
146045
  const url2 = await (await getFunctionsClient()).getDeploymentDownload(functionId, deploymentId, type);
145505
146046
  const response = await fetch(url2);
145506
146047
  const buffer = Buffer.from(await response.arrayBuffer());
145507
- import_fs17.default.writeFileSync(destination, buffer);
146048
+ import_fs18.default.writeFileSync(destination, buffer);
145508
146049
  success2(`File saved to ${destination}`);
145509
146050
  }
145510
146051
  )
@@ -145529,7 +146070,7 @@ var functionsCreateExecutionCommand = functions.command(`create-execution`).desc
145529
146070
  (value) => value === void 0 ? true : parseBool(value)
145530
146071
  ).option(`--path <path>`, `HTTP path of execution. Path can include query params. Default value is /`).option(`--method <method>`, `HTTP method of execution. Default value is POST.`).option(`--headers <headers>`, `HTTP headers of execution. Defaults to empty.`).option(`--scheduled-at <scheduled-at>`, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.`).action(
145531
146072
  actionRunner(
145532
- async ({ functionId, body, async, path: path16, method, headers, scheduledAt }) => parse3(await (await getFunctionsClient()).createExecution(functionId, body, async, path16, method, JSON.parse(headers), scheduledAt))
146073
+ async ({ functionId, body, async, path: path17, method, headers, scheduledAt }) => parse3(await (await getFunctionsClient()).createExecution(functionId, body, async, path17, method, JSON.parse(headers), scheduledAt))
145533
146074
  )
145534
146075
  );
145535
146076
  var functionsGetExecutionCommand = functions.command(`get-execution`).description(`Get a function execution log by its unique ID.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--execution-id <execution-id>`, `Execution ID.`).action(
@@ -147064,7 +147605,7 @@ var proxyUpdateRuleVerificationCommand = proxy.command(`update-rule-verification
147064
147605
  );
147065
147606
 
147066
147607
  // lib/commands/services/sites.ts
147067
- var import_fs18 = __toESM(require("fs"), 1);
147608
+ var import_fs19 = __toESM(require("fs"), 1);
147068
147609
  var sitesClient = null;
147069
147610
  var getSitesClient = async () => {
147070
147611
  if (!sitesClient) {
@@ -147220,7 +147761,7 @@ var sitesGetDeploymentDownloadCommand = sites.command(`get-deployment-download`)
147220
147761
  const url2 = await (await getSitesClient()).getDeploymentDownload(siteId, deploymentId, type);
147221
147762
  const response = await fetch(url2);
147222
147763
  const buffer = Buffer.from(await response.arrayBuffer());
147223
- import_fs18.default.writeFileSync(destination, buffer);
147764
+ import_fs19.default.writeFileSync(destination, buffer);
147224
147765
  success2(`File saved to ${destination}`);
147225
147766
  }
147226
147767
  )
@@ -147289,7 +147830,7 @@ var sitesDeleteVariableCommand = sites.command(`delete-variable`).description(`D
147289
147830
  );
147290
147831
 
147291
147832
  // lib/commands/services/storage.ts
147292
- var import_fs19 = __toESM(require("fs"), 1);
147833
+ var import_fs20 = __toESM(require("fs"), 1);
147293
147834
  var storageClient = null;
147294
147835
  var getStorageClient = async () => {
147295
147836
  if (!storageClient) {
@@ -147412,7 +147953,7 @@ var storageGetFileDownloadCommand = storage.command(`get-file-download`).descrip
147412
147953
  const url2 = await (await getStorageClient()).getFileDownload(bucketId, fileId, token);
147413
147954
  const response = await fetch(url2);
147414
147955
  const buffer = Buffer.from(await response.arrayBuffer());
147415
- import_fs19.default.writeFileSync(destination, buffer);
147956
+ import_fs20.default.writeFileSync(destination, buffer);
147416
147957
  success2(`File saved to ${destination}`);
147417
147958
  }
147418
147959
  )
@@ -147423,7 +147964,7 @@ var storageGetFilePreviewCommand = storage.command(`get-file-preview`).descripti
147423
147964
  const url2 = await (await getStorageClient()).getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token);
147424
147965
  const response = await fetch(url2);
147425
147966
  const buffer = Buffer.from(await response.arrayBuffer());
147426
- import_fs19.default.writeFileSync(destination, buffer);
147967
+ import_fs20.default.writeFileSync(destination, buffer);
147427
147968
  success2(`File saved to ${destination}`);
147428
147969
  }
147429
147970
  )
@@ -147434,7 +147975,7 @@ var storageGetFileViewCommand = storage.command(`get-file-view`).description(`Ge
147434
147975
  const url2 = await (await getStorageClient()).getFileView(bucketId, fileId, token);
147435
147976
  const response = await fetch(url2);
147436
147977
  const buffer = Buffer.from(await response.arrayBuffer());
147437
- import_fs19.default.writeFileSync(destination, buffer);
147978
+ import_fs20.default.writeFileSync(destination, buffer);
147438
147979
  success2(`File saved to ${destination}`);
147439
147980
  }
147440
147981
  )
@@ -148588,7 +149129,9 @@ async function maybeShowUpdateNotice() {
148588
149129
  async function checkVersion() {
148589
149130
  process.stdout.write(import_chalk15.default.bold(`appwrite version ${version3}`) + "\n");
148590
149131
  try {
148591
- const latestVersion = await getLatestVersion({ timeoutMs: VERSION_CHECK_TIMEOUT_MS });
149132
+ const latestVersion = await getLatestVersionForCurrentInstallation({
149133
+ timeoutMs: VERSION_CHECK_TIMEOUT_MS
149134
+ });
148592
149135
  syncVersionCheckCache(version3, latestVersion);
148593
149136
  const comparison = compareVersions(version3, latestVersion);
148594
149137
  if (comparison > 0) {