@base44-preview/cli 0.0.36-pr.349.048c115 → 0.0.36-pr.353.1448b47

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/index.js CHANGED
@@ -13211,58 +13211,34 @@ var require_cross_spawn = __commonJS((exports, module) => {
13211
13211
  module.exports._enoent = enoent;
13212
13212
  });
13213
13213
 
13214
- // node_modules/lodash.kebabcase/index.js
13215
- var require_lodash = __commonJS((exports, module) => {
13216
- var INFINITY = 1 / 0;
13217
- var symbolTag = "[object Symbol]";
13218
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
13219
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
13220
- var rsAstralRange = "\\ud800-\\udfff";
13221
- var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23";
13222
- var rsComboSymbolsRange = "\\u20d0-\\u20f0";
13223
- var rsDingbatRange = "\\u2700-\\u27bf";
13224
- var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
13225
- var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
13226
- var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
13227
- var rsPunctuationRange = "\\u2000-\\u206f";
13228
- var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
13229
- var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
13230
- var rsVarRange = "\\ufe0e\\ufe0f";
13231
- var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
13232
- var rsApos = "['’]";
13233
- var rsBreak = "[" + rsBreakRange + "]";
13234
- var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]";
13235
- var rsDigits = "\\d+";
13236
- var rsDingbat = "[" + rsDingbatRange + "]";
13237
- var rsLower = "[" + rsLowerRange + "]";
13238
- var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
13239
- var rsFitz = "\\ud83c[\\udffb-\\udfff]";
13240
- var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
13241
- var rsNonAstral = "[^" + rsAstralRange + "]";
13242
- var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
13243
- var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
13244
- var rsUpper = "[" + rsUpperRange + "]";
13245
- var rsZWJ = "\\u200d";
13246
- var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
13247
- var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
13248
- var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
13249
- var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
13250
- var reOptMod = rsModifier + "?";
13251
- var rsOptVar = "[" + rsVarRange + "]?";
13252
- var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
13253
- var rsSeq = rsOptVar + reOptMod + rsOptJoin;
13254
- var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq;
13255
- var reApos = RegExp(rsApos, "g");
13256
- var reComboMark = RegExp(rsCombo, "g");
13257
- var reUnicodeWord = RegExp([
13258
- rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
13259
- rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [rsBreak, rsUpper + rsLowerMisc, "$"].join("|") + ")",
13260
- rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
13261
- rsUpper + "+" + rsOptUpperContr,
13262
- rsDigits,
13263
- rsEmoji
13264
- ].join("|"), "g");
13265
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
13214
+ // node_modules/lodash/_arrayReduce.js
13215
+ var require__arrayReduce = __commonJS((exports, module) => {
13216
+ function arrayReduce(array2, iteratee, accumulator, initAccum) {
13217
+ var index = -1, length = array2 == null ? 0 : array2.length;
13218
+ if (initAccum && length) {
13219
+ accumulator = array2[++index];
13220
+ }
13221
+ while (++index < length) {
13222
+ accumulator = iteratee(accumulator, array2[index], index, array2);
13223
+ }
13224
+ return accumulator;
13225
+ }
13226
+ module.exports = arrayReduce;
13227
+ });
13228
+
13229
+ // node_modules/lodash/_basePropertyOf.js
13230
+ var require__basePropertyOf = __commonJS((exports, module) => {
13231
+ function basePropertyOf(object2) {
13232
+ return function(key) {
13233
+ return object2 == null ? undefined : object2[key];
13234
+ };
13235
+ }
13236
+ module.exports = basePropertyOf;
13237
+ });
13238
+
13239
+ // node_modules/lodash/_deburrLetter.js
13240
+ var require__deburrLetter = __commonJS((exports, module) => {
13241
+ var basePropertyOf = require__basePropertyOf();
13266
13242
  var deburredLetters = {
13267
13243
  "À": "A",
13268
13244
  "Á": "A",
@@ -13453,72 +13429,256 @@ var require_lodash = __commonJS((exports, module) => {
13453
13429
  "Œ": "Oe",
13454
13430
  "œ": "oe",
13455
13431
  "ʼn": "'n",
13456
- "ſ": "ss"
13432
+ "ſ": "s"
13457
13433
  };
13434
+ var deburrLetter = basePropertyOf(deburredLetters);
13435
+ module.exports = deburrLetter;
13436
+ });
13437
+
13438
+ // node_modules/lodash/_freeGlobal.js
13439
+ var require__freeGlobal = __commonJS((exports, module) => {
13458
13440
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
13441
+ module.exports = freeGlobal;
13442
+ });
13443
+
13444
+ // node_modules/lodash/_root.js
13445
+ var require__root = __commonJS((exports, module) => {
13446
+ var freeGlobal = require__freeGlobal();
13459
13447
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
13460
13448
  var root = freeGlobal || freeSelf || Function("return this")();
13461
- function arrayReduce(array2, iteratee, accumulator, initAccum) {
13462
- var index = -1, length = array2 ? array2.length : 0;
13463
- if (initAccum && length) {
13464
- accumulator = array2[++index];
13465
- }
13449
+ module.exports = root;
13450
+ });
13451
+
13452
+ // node_modules/lodash/_Symbol.js
13453
+ var require__Symbol = __commonJS((exports, module) => {
13454
+ var root = require__root();
13455
+ var Symbol2 = root.Symbol;
13456
+ module.exports = Symbol2;
13457
+ });
13458
+
13459
+ // node_modules/lodash/_arrayMap.js
13460
+ var require__arrayMap = __commonJS((exports, module) => {
13461
+ function arrayMap(array2, iteratee) {
13462
+ var index = -1, length = array2 == null ? 0 : array2.length, result = Array(length);
13466
13463
  while (++index < length) {
13467
- accumulator = iteratee(accumulator, array2[index], index, array2);
13464
+ result[index] = iteratee(array2[index], index, array2);
13468
13465
  }
13469
- return accumulator;
13466
+ return result;
13470
13467
  }
13471
- function asciiWords(string4) {
13472
- return string4.match(reAsciiWord) || [];
13468
+ module.exports = arrayMap;
13469
+ });
13470
+
13471
+ // node_modules/lodash/isArray.js
13472
+ var require_isArray = __commonJS((exports, module) => {
13473
+ var isArray = Array.isArray;
13474
+ module.exports = isArray;
13475
+ });
13476
+
13477
+ // node_modules/lodash/_getRawTag.js
13478
+ var require__getRawTag = __commonJS((exports, module) => {
13479
+ var Symbol2 = require__Symbol();
13480
+ var objectProto = Object.prototype;
13481
+ var hasOwnProperty = objectProto.hasOwnProperty;
13482
+ var nativeObjectToString = objectProto.toString;
13483
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
13484
+ function getRawTag(value) {
13485
+ var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
13486
+ try {
13487
+ value[symToStringTag] = undefined;
13488
+ var unmasked = true;
13489
+ } catch (e2) {}
13490
+ var result = nativeObjectToString.call(value);
13491
+ if (unmasked) {
13492
+ if (isOwn) {
13493
+ value[symToStringTag] = tag;
13494
+ } else {
13495
+ delete value[symToStringTag];
13496
+ }
13497
+ }
13498
+ return result;
13473
13499
  }
13474
- function basePropertyOf(object2) {
13475
- return function(key) {
13476
- return object2 == null ? undefined : object2[key];
13477
- };
13500
+ module.exports = getRawTag;
13501
+ });
13502
+
13503
+ // node_modules/lodash/_objectToString.js
13504
+ var require__objectToString = __commonJS((exports, module) => {
13505
+ var objectProto = Object.prototype;
13506
+ var nativeObjectToString = objectProto.toString;
13507
+ function objectToString3(value) {
13508
+ return nativeObjectToString.call(value);
13478
13509
  }
13479
- var deburrLetter = basePropertyOf(deburredLetters);
13480
- function hasUnicodeWord(string4) {
13481
- return reHasUnicodeWord.test(string4);
13510
+ module.exports = objectToString3;
13511
+ });
13512
+
13513
+ // node_modules/lodash/_baseGetTag.js
13514
+ var require__baseGetTag = __commonJS((exports, module) => {
13515
+ var Symbol2 = require__Symbol();
13516
+ var getRawTag = require__getRawTag();
13517
+ var objectToString3 = require__objectToString();
13518
+ var nullTag = "[object Null]";
13519
+ var undefinedTag = "[object Undefined]";
13520
+ var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
13521
+ function baseGetTag(value) {
13522
+ if (value == null) {
13523
+ return value === undefined ? undefinedTag : nullTag;
13524
+ }
13525
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString3(value);
13482
13526
  }
13483
- function unicodeWords(string4) {
13484
- return string4.match(reUnicodeWord) || [];
13527
+ module.exports = baseGetTag;
13528
+ });
13529
+
13530
+ // node_modules/lodash/isObjectLike.js
13531
+ var require_isObjectLike = __commonJS((exports, module) => {
13532
+ function isObjectLike(value) {
13533
+ return value != null && typeof value == "object";
13485
13534
  }
13486
- var objectProto = Object.prototype;
13487
- var objectToString3 = objectProto.toString;
13488
- var Symbol2 = root.Symbol;
13535
+ module.exports = isObjectLike;
13536
+ });
13537
+
13538
+ // node_modules/lodash/isSymbol.js
13539
+ var require_isSymbol = __commonJS((exports, module) => {
13540
+ var baseGetTag = require__baseGetTag();
13541
+ var isObjectLike = require_isObjectLike();
13542
+ var symbolTag = "[object Symbol]";
13543
+ function isSymbol(value) {
13544
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
13545
+ }
13546
+ module.exports = isSymbol;
13547
+ });
13548
+
13549
+ // node_modules/lodash/_baseToString.js
13550
+ var require__baseToString = __commonJS((exports, module) => {
13551
+ var Symbol2 = require__Symbol();
13552
+ var arrayMap = require__arrayMap();
13553
+ var isArray = require_isArray();
13554
+ var isSymbol = require_isSymbol();
13555
+ var INFINITY = 1 / 0;
13489
13556
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined;
13490
13557
  var symbolToString = symbolProto ? symbolProto.toString : undefined;
13491
13558
  function baseToString(value) {
13492
13559
  if (typeof value == "string") {
13493
13560
  return value;
13494
13561
  }
13562
+ if (isArray(value)) {
13563
+ return arrayMap(value, baseToString) + "";
13564
+ }
13495
13565
  if (isSymbol(value)) {
13496
13566
  return symbolToString ? symbolToString.call(value) : "";
13497
13567
  }
13498
13568
  var result = value + "";
13499
13569
  return result == "0" && 1 / value == -INFINITY ? "-0" : result;
13500
13570
  }
13501
- function createCompounder(callback) {
13502
- return function(string4) {
13503
- return arrayReduce(words(deburr(string4).replace(reApos, "")), callback, "");
13504
- };
13505
- }
13506
- function isObjectLike(value) {
13507
- return !!value && typeof value == "object";
13508
- }
13509
- function isSymbol(value) {
13510
- return typeof value == "symbol" || isObjectLike(value) && objectToString3.call(value) == symbolTag;
13511
- }
13571
+ module.exports = baseToString;
13572
+ });
13573
+
13574
+ // node_modules/lodash/toString.js
13575
+ var require_toString = __commonJS((exports, module) => {
13576
+ var baseToString = require__baseToString();
13512
13577
  function toString2(value) {
13513
13578
  return value == null ? "" : baseToString(value);
13514
13579
  }
13580
+ module.exports = toString2;
13581
+ });
13582
+
13583
+ // node_modules/lodash/deburr.js
13584
+ var require_deburr = __commonJS((exports, module) => {
13585
+ var deburrLetter = require__deburrLetter();
13586
+ var toString2 = require_toString();
13587
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
13588
+ var rsComboMarksRange = "\\u0300-\\u036f";
13589
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
13590
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
13591
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
13592
+ var rsCombo = "[" + rsComboRange + "]";
13593
+ var reComboMark = RegExp(rsCombo, "g");
13515
13594
  function deburr(string4) {
13516
13595
  string4 = toString2(string4);
13517
13596
  return string4 && string4.replace(reLatin, deburrLetter).replace(reComboMark, "");
13518
13597
  }
13519
- var kebabCase = createCompounder(function(result, word, index) {
13520
- return result + (index ? "-" : "") + word.toLowerCase();
13521
- });
13598
+ module.exports = deburr;
13599
+ });
13600
+
13601
+ // node_modules/lodash/_asciiWords.js
13602
+ var require__asciiWords = __commonJS((exports, module) => {
13603
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
13604
+ function asciiWords(string4) {
13605
+ return string4.match(reAsciiWord) || [];
13606
+ }
13607
+ module.exports = asciiWords;
13608
+ });
13609
+
13610
+ // node_modules/lodash/_hasUnicodeWord.js
13611
+ var require__hasUnicodeWord = __commonJS((exports, module) => {
13612
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
13613
+ function hasUnicodeWord(string4) {
13614
+ return reHasUnicodeWord.test(string4);
13615
+ }
13616
+ module.exports = hasUnicodeWord;
13617
+ });
13618
+
13619
+ // node_modules/lodash/_unicodeWords.js
13620
+ var require__unicodeWords = __commonJS((exports, module) => {
13621
+ var rsAstralRange = "\\ud800-\\udfff";
13622
+ var rsComboMarksRange = "\\u0300-\\u036f";
13623
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
13624
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
13625
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
13626
+ var rsDingbatRange = "\\u2700-\\u27bf";
13627
+ var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
13628
+ var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
13629
+ var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
13630
+ var rsPunctuationRange = "\\u2000-\\u206f";
13631
+ var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
13632
+ var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
13633
+ var rsVarRange = "\\ufe0e\\ufe0f";
13634
+ var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
13635
+ var rsApos = "['’]";
13636
+ var rsBreak = "[" + rsBreakRange + "]";
13637
+ var rsCombo = "[" + rsComboRange + "]";
13638
+ var rsDigits = "\\d+";
13639
+ var rsDingbat = "[" + rsDingbatRange + "]";
13640
+ var rsLower = "[" + rsLowerRange + "]";
13641
+ var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
13642
+ var rsFitz = "\\ud83c[\\udffb-\\udfff]";
13643
+ var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
13644
+ var rsNonAstral = "[^" + rsAstralRange + "]";
13645
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
13646
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
13647
+ var rsUpper = "[" + rsUpperRange + "]";
13648
+ var rsZWJ = "\\u200d";
13649
+ var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
13650
+ var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
13651
+ var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
13652
+ var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
13653
+ var reOptMod = rsModifier + "?";
13654
+ var rsOptVar = "[" + rsVarRange + "]?";
13655
+ var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
13656
+ var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
13657
+ var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
13658
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
13659
+ var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq;
13660
+ var reUnicodeWord = RegExp([
13661
+ rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
13662
+ rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
13663
+ rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
13664
+ rsUpper + "+" + rsOptContrUpper,
13665
+ rsOrdUpper,
13666
+ rsOrdLower,
13667
+ rsDigits,
13668
+ rsEmoji
13669
+ ].join("|"), "g");
13670
+ function unicodeWords(string4) {
13671
+ return string4.match(reUnicodeWord) || [];
13672
+ }
13673
+ module.exports = unicodeWords;
13674
+ });
13675
+
13676
+ // node_modules/lodash/words.js
13677
+ var require_words = __commonJS((exports, module) => {
13678
+ var asciiWords = require__asciiWords();
13679
+ var hasUnicodeWord = require__hasUnicodeWord();
13680
+ var toString2 = require_toString();
13681
+ var unicodeWords = require__unicodeWords();
13522
13682
  function words(string4, pattern, guard) {
13523
13683
  string4 = toString2(string4);
13524
13684
  pattern = guard ? undefined : pattern;
@@ -13527,6 +13687,30 @@ var require_lodash = __commonJS((exports, module) => {
13527
13687
  }
13528
13688
  return string4.match(pattern) || [];
13529
13689
  }
13690
+ module.exports = words;
13691
+ });
13692
+
13693
+ // node_modules/lodash/_createCompounder.js
13694
+ var require__createCompounder = __commonJS((exports, module) => {
13695
+ var arrayReduce = require__arrayReduce();
13696
+ var deburr = require_deburr();
13697
+ var words = require_words();
13698
+ var rsApos = "['’]";
13699
+ var reApos = RegExp(rsApos, "g");
13700
+ function createCompounder(callback) {
13701
+ return function(string4) {
13702
+ return arrayReduce(words(deburr(string4).replace(reApos, "")), callback, "");
13703
+ };
13704
+ }
13705
+ module.exports = createCompounder;
13706
+ });
13707
+
13708
+ // node_modules/lodash/kebabCase.js
13709
+ var require_kebabCase = __commonJS((exports, module) => {
13710
+ var createCompounder = require__createCompounder();
13711
+ var kebabCase = createCompounder(function(result, word, index) {
13712
+ return result + (index ? "-" : "") + word.toLowerCase();
13713
+ });
13530
13714
  module.exports = kebabCase;
13531
13715
  });
13532
13716
 
@@ -14609,7 +14793,7 @@ var require_lib2 = __commonJS((exports) => {
14609
14793
  });
14610
14794
 
14611
14795
  // node_modules/lodash/lodash.js
14612
- var require_lodash2 = __commonJS((exports, module) => {
14796
+ var require_lodash = __commonJS((exports, module) => {
14613
14797
  (function() {
14614
14798
  var undefined2;
14615
14799
  var VERSION = "4.17.23";
@@ -127599,7 +127783,7 @@ var require_AST = __commonJS((exports) => {
127599
127783
  var require_JSONSchema = __commonJS((exports) => {
127600
127784
  Object.defineProperty(exports, "__esModule", { value: true });
127601
127785
  exports.isCompound = exports.isPrimitive = exports.isBoolean = exports.getRootSchema = exports.Intersection = exports.Types = exports.Parent = undefined;
127602
- var lodash_1 = require_lodash2();
127786
+ var lodash_1 = require_lodash();
127603
127787
  exports.Parent = Symbol("Parent");
127604
127788
  exports.Types = Symbol("Types");
127605
127789
  exports.Intersection = Symbol("Intersection");
@@ -130406,7 +130590,7 @@ var require_utils7 = __commonJS((exports) => {
130406
130590
  };
130407
130591
  Object.defineProperty(exports, "__esModule", { value: true });
130408
130592
  exports.parseFileAsJSONSchema = exports.isSchemaLike = exports.appendToDescription = exports.maybeStripDefault = exports.pathTransform = exports.escapeBlockComment = exports.log = exports.error = exports.generateName = exports.toSafeString = exports.stripExtension = exports.justName = exports.traverse = exports.Try = undefined;
130409
- var lodash_1 = require_lodash2();
130593
+ var lodash_1 = require_lodash();
130410
130594
  var path_1 = __require("path");
130411
130595
  var JSONSchema_1 = require_JSONSchema();
130412
130596
  var js_yaml_1 = __importDefault(require_js_yaml3());
@@ -130737,7 +130921,7 @@ ${values.join(`
130737
130921
  var require_generator = __commonJS((exports) => {
130738
130922
  Object.defineProperty(exports, "__esModule", { value: true });
130739
130923
  exports.generateType = exports.generate = undefined;
130740
- var lodash_1 = require_lodash2();
130924
+ var lodash_1 = require_lodash();
130741
130925
  var index_1 = require_src3();
130742
130926
  var AST_1 = require_AST();
130743
130927
  var utils_1 = require_utils7();
@@ -131000,7 +131184,7 @@ var require_generator = __commonJS((exports) => {
131000
131184
  var require_typesOfSchema = __commonJS((exports) => {
131001
131185
  Object.defineProperty(exports, "__esModule", { value: true });
131002
131186
  exports.typesOfSchema = undefined;
131003
- var lodash_1 = require_lodash2();
131187
+ var lodash_1 = require_lodash();
131004
131188
  var JSONSchema_1 = require_JSONSchema();
131005
131189
  function typesOfSchema(schema9) {
131006
131190
  if (schema9.tsType) {
@@ -131359,7 +131543,7 @@ var require_normalizer = __commonJS((exports) => {
131359
131543
  var require_optimizer = __commonJS((exports) => {
131360
131544
  Object.defineProperty(exports, "__esModule", { value: true });
131361
131545
  exports.optimize = undefined;
131362
- var lodash_1 = require_lodash2();
131546
+ var lodash_1 = require_lodash();
131363
131547
  var generator_1 = require_generator();
131364
131548
  var AST_1 = require_AST();
131365
131549
  var utils_1 = require_utils7();
@@ -131425,7 +131609,7 @@ var require_optimizer = __commonJS((exports) => {
131425
131609
  var require_parser = __commonJS((exports) => {
131426
131610
  Object.defineProperty(exports, "__esModule", { value: true });
131427
131611
  exports.parse = undefined;
131428
- var lodash_1 = require_lodash2();
131612
+ var lodash_1 = require_lodash();
131429
131613
  var util_1 = __require("util");
131430
131614
  var applySchemaTyping_1 = require_applySchemaTyping();
131431
131615
  var AST_1 = require_AST();
@@ -137278,7 +137462,7 @@ var require_linker = __commonJS((exports) => {
137278
137462
  Object.defineProperty(exports, "__esModule", { value: true });
137279
137463
  exports.link = undefined;
137280
137464
  var JSONSchema_1 = require_JSONSchema();
137281
- var lodash_1 = require_lodash2();
137465
+ var lodash_1 = require_lodash();
137282
137466
  function link2(schema9, parent = null) {
137283
137467
  if (!Array.isArray(schema9) && !(0, lodash_1.isPlainObject)(schema9)) {
137284
137468
  return schema9;
@@ -137346,7 +137530,7 @@ var require_src3 = __commonJS((exports) => {
137346
137530
  Object.defineProperty(exports, "__esModule", { value: true });
137347
137531
  exports.ValidationError = exports.compile = exports.compileFromFile = exports.DEFAULT_OPTIONS = undefined;
137348
137532
  var fs_1 = __require("fs");
137349
- var lodash_1 = require_lodash2();
137533
+ var lodash_1 = require_lodash();
137350
137534
  var path_1 = __require("path");
137351
137535
  var formatter_1 = require_formatter();
137352
137536
  var generator_1 = require_generator();
@@ -210218,6 +210402,168 @@ var require_multer = __commonJS((exports, module) => {
210218
210402
  module.exports.MulterError = MulterError;
210219
210403
  });
210220
210404
 
210405
+ // node_modules/lodash/isObject.js
210406
+ var require_isObject = __commonJS((exports, module) => {
210407
+ function isObject5(value) {
210408
+ var type = typeof value;
210409
+ return value != null && (type == "object" || type == "function");
210410
+ }
210411
+ module.exports = isObject5;
210412
+ });
210413
+
210414
+ // node_modules/lodash/now.js
210415
+ var require_now = __commonJS((exports, module) => {
210416
+ var root2 = require__root();
210417
+ var now = function() {
210418
+ return root2.Date.now();
210419
+ };
210420
+ module.exports = now;
210421
+ });
210422
+
210423
+ // node_modules/lodash/_trimmedEndIndex.js
210424
+ var require__trimmedEndIndex = __commonJS((exports, module) => {
210425
+ var reWhitespace = /\s/;
210426
+ function trimmedEndIndex(string4) {
210427
+ var index = string4.length;
210428
+ while (index-- && reWhitespace.test(string4.charAt(index))) {}
210429
+ return index;
210430
+ }
210431
+ module.exports = trimmedEndIndex;
210432
+ });
210433
+
210434
+ // node_modules/lodash/_baseTrim.js
210435
+ var require__baseTrim = __commonJS((exports, module) => {
210436
+ var trimmedEndIndex = require__trimmedEndIndex();
210437
+ var reTrimStart = /^\s+/;
210438
+ function baseTrim(string4) {
210439
+ return string4 ? string4.slice(0, trimmedEndIndex(string4) + 1).replace(reTrimStart, "") : string4;
210440
+ }
210441
+ module.exports = baseTrim;
210442
+ });
210443
+
210444
+ // node_modules/lodash/toNumber.js
210445
+ var require_toNumber = __commonJS((exports, module) => {
210446
+ var baseTrim = require__baseTrim();
210447
+ var isObject5 = require_isObject();
210448
+ var isSymbol = require_isSymbol();
210449
+ var NAN = 0 / 0;
210450
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
210451
+ var reIsBinary = /^0b[01]+$/i;
210452
+ var reIsOctal = /^0o[0-7]+$/i;
210453
+ var freeParseInt = parseInt;
210454
+ function toNumber(value) {
210455
+ if (typeof value == "number") {
210456
+ return value;
210457
+ }
210458
+ if (isSymbol(value)) {
210459
+ return NAN;
210460
+ }
210461
+ if (isObject5(value)) {
210462
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
210463
+ value = isObject5(other) ? other + "" : other;
210464
+ }
210465
+ if (typeof value != "string") {
210466
+ return value === 0 ? value : +value;
210467
+ }
210468
+ value = baseTrim(value);
210469
+ var isBinary = reIsBinary.test(value);
210470
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
210471
+ }
210472
+ module.exports = toNumber;
210473
+ });
210474
+
210475
+ // node_modules/lodash/debounce.js
210476
+ var require_debounce = __commonJS((exports, module) => {
210477
+ var isObject5 = require_isObject();
210478
+ var now = require_now();
210479
+ var toNumber = require_toNumber();
210480
+ var FUNC_ERROR_TEXT = "Expected a function";
210481
+ var nativeMax = Math.max;
210482
+ var nativeMin = Math.min;
210483
+ function debounce(func, wait, options8) {
210484
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
210485
+ if (typeof func != "function") {
210486
+ throw new TypeError(FUNC_ERROR_TEXT);
210487
+ }
210488
+ wait = toNumber(wait) || 0;
210489
+ if (isObject5(options8)) {
210490
+ leading = !!options8.leading;
210491
+ maxing = "maxWait" in options8;
210492
+ maxWait = maxing ? nativeMax(toNumber(options8.maxWait) || 0, wait) : maxWait;
210493
+ trailing = "trailing" in options8 ? !!options8.trailing : trailing;
210494
+ }
210495
+ function invokeFunc(time3) {
210496
+ var args = lastArgs, thisArg = lastThis;
210497
+ lastArgs = lastThis = undefined;
210498
+ lastInvokeTime = time3;
210499
+ result = func.apply(thisArg, args);
210500
+ return result;
210501
+ }
210502
+ function leadingEdge(time3) {
210503
+ lastInvokeTime = time3;
210504
+ timerId = setTimeout(timerExpired, wait);
210505
+ return leading ? invokeFunc(time3) : result;
210506
+ }
210507
+ function remainingWait(time3) {
210508
+ var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
210509
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
210510
+ }
210511
+ function shouldInvoke(time3) {
210512
+ var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime;
210513
+ return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
210514
+ }
210515
+ function timerExpired() {
210516
+ var time3 = now();
210517
+ if (shouldInvoke(time3)) {
210518
+ return trailingEdge(time3);
210519
+ }
210520
+ timerId = setTimeout(timerExpired, remainingWait(time3));
210521
+ }
210522
+ function trailingEdge(time3) {
210523
+ timerId = undefined;
210524
+ if (trailing && lastArgs) {
210525
+ return invokeFunc(time3);
210526
+ }
210527
+ lastArgs = lastThis = undefined;
210528
+ return result;
210529
+ }
210530
+ function cancel() {
210531
+ if (timerId !== undefined) {
210532
+ clearTimeout(timerId);
210533
+ }
210534
+ lastInvokeTime = 0;
210535
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
210536
+ }
210537
+ function flush() {
210538
+ return timerId === undefined ? result : trailingEdge(now());
210539
+ }
210540
+ function debounced() {
210541
+ var time3 = now(), isInvoking = shouldInvoke(time3);
210542
+ lastArgs = arguments;
210543
+ lastThis = this;
210544
+ lastCallTime = time3;
210545
+ if (isInvoking) {
210546
+ if (timerId === undefined) {
210547
+ return leadingEdge(lastCallTime);
210548
+ }
210549
+ if (maxing) {
210550
+ clearTimeout(timerId);
210551
+ timerId = setTimeout(timerExpired, wait);
210552
+ return invokeFunc(lastCallTime);
210553
+ }
210554
+ }
210555
+ if (timerId === undefined) {
210556
+ timerId = setTimeout(timerExpired, wait);
210557
+ }
210558
+ return result;
210559
+ }
210560
+ debounced.cancel = cancel;
210561
+ debounced.flush = flush;
210562
+ return debounced;
210563
+ }
210564
+ module.exports = debounce;
210565
+ });
210566
+
210221
210567
  // node_modules/@vercel/detect-agent/dist/index.js
210222
210568
  var require_dist5 = __commonJS((exports, module) => {
210223
210569
  var __defProp4 = Object.defineProperty;
@@ -210243,8 +210589,8 @@ var require_dist5 = __commonJS((exports, module) => {
210243
210589
  determineAgent: () => determineAgent
210244
210590
  });
210245
210591
  module.exports = __toCommonJS(src_exports);
210246
- var import_promises19 = __require("node:fs/promises");
210247
- var import_node_fs19 = __require("node:fs");
210592
+ var import_promises22 = __require("node:fs/promises");
210593
+ var import_node_fs21 = __require("node:fs");
210248
210594
  var DEVIN_LOCAL_PATH = "/opt/.devin";
210249
210595
  var CURSOR2 = "cursor";
210250
210596
  var CURSOR_CLI = "cursor-cli";
@@ -210301,7 +210647,7 @@ var require_dist5 = __commonJS((exports, module) => {
210301
210647
  return { isAgent: true, agent: { name: REPLIT } };
210302
210648
  }
210303
210649
  try {
210304
- await (0, import_promises19.access)(DEVIN_LOCAL_PATH, import_node_fs19.constants.F_OK);
210650
+ await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs21.constants.F_OK);
210305
210651
  return { isAgent: true, agent: { name: DEVIN } };
210306
210652
  } catch (error48) {}
210307
210653
  return { isAgent: false, agent: undefined };
@@ -241561,11 +241907,12 @@ var package_default = {
241561
241907
  "@types/ejs": "^3.1.5",
241562
241908
  "@types/express": "^5.0.6",
241563
241909
  "@types/json-schema": "^7.0.15",
241564
- "@types/lodash.kebabcase": "^4.1.9",
241565
- "@types/node": "^22.10.5",
241910
+ "@types/lodash": "^4.17.24",
241566
241911
  "@types/multer": "^2.0.0",
241912
+ "@types/node": "^22.10.5",
241567
241913
  "@vercel/detect-agent": "^1.1.0",
241568
241914
  chalk: "^5.6.2",
241915
+ chokidar: "^5.0.0",
241569
241916
  commander: "^12.1.0",
241570
241917
  "common-tags": "^1.8.2",
241571
241918
  cors: "^2.8.5",
@@ -241581,9 +241928,9 @@ var package_default = {
241581
241928
  json5: "^2.2.3",
241582
241929
  knip: "^5.83.1",
241583
241930
  ky: "^1.14.2",
241584
- "lodash.kebabcase": "^4.1.1",
241585
- multer: "^2.0.0",
241931
+ lodash: "^4.17.23",
241586
241932
  msw: "^2.12.10",
241933
+ multer: "^2.0.0",
241587
241934
  nanoid: "^5.1.6",
241588
241935
  open: "^11.0.0",
241589
241936
  "p-wait-for": "^6.0.0",
@@ -242706,7 +243053,7 @@ function getFunctionsDeployCommand(context) {
242706
243053
 
242707
243054
  // src/cli/commands/project/create.ts
242708
243055
  import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
242709
- var import_lodash = __toESM(require_lodash(), 1);
243056
+ var import_kebabCase = __toESM(require_kebabCase(), 1);
242710
243057
  var DEFAULT_TEMPLATE_ID = "backend-only";
242711
243058
  async function getTemplateById(templateId) {
242712
243059
  const templates = await listTemplates();
@@ -242750,7 +243097,7 @@ async function createInteractive(options) {
242750
243097
  });
242751
243098
  },
242752
243099
  projectPath: async ({ results }) => {
242753
- const suggestedPath = await isDirEmpty() ? "./" : `./${import_lodash.default(results.name)}`;
243100
+ const suggestedPath = await isDirEmpty() ? "./" : `./${import_kebabCase.default(results.name)}`;
242754
243101
  return Ze({
242755
243102
  message: "Where should we create your project?",
242756
243103
  placeholder: suggestedPath,
@@ -243513,6 +243860,7 @@ function getTypesCommand(context) {
243513
243860
  }
243514
243861
 
243515
243862
  // src/cli/dev/dev-server/main.ts
243863
+ import { dirname as dirname14, join as join18 } from "node:path";
243516
243864
  var import_cors = __toESM(require_lib4(), 1);
243517
243865
  var import_express4 = __toESM(require_express(), 1);
243518
243866
 
@@ -243720,6 +244068,10 @@ class FunctionManager {
243720
244068
  try {
243721
244069
  return await promise2;
243722
244070
  } finally {
244071
+ if (!this.starting.has(name2) && this.running.has(name2)) {
244072
+ this.running.get(name2)?.process.kill();
244073
+ this.running.delete(name2);
244074
+ }
243723
244075
  this.starting.delete(name2);
243724
244076
  }
243725
244077
  }
@@ -243735,6 +244087,10 @@ class FunctionManager {
243735
244087
  this.setupProcessHandlers(name2, process21);
243736
244088
  return this.waitForReady(name2, runningFunc);
243737
244089
  }
244090
+ reload(functions) {
244091
+ this.stopAll();
244092
+ this.functions = new Map(functions.map((f7) => [f7.name, f7]));
244093
+ }
243738
244094
  stopAll() {
243739
244095
  for (const [name2, { process: process21 }] of this.running) {
243740
244096
  this.logger.log(`[dev-server] Stopping function: ${name2}`);
@@ -243776,7 +244132,9 @@ class FunctionManager {
243776
244132
  }
243777
244133
  });
243778
244134
  process21.on("exit", (code2) => {
243779
- this.logger.log(`[dev-server] Function "${name2}" exited with code ${code2}`);
244135
+ if (code2 !== null) {
244136
+ this.logger.log(`[dev-server] Function "${name2}" exited with code ${code2}`);
244137
+ }
243780
244138
  this.running.delete(name2);
243781
244139
  });
243782
244140
  process21.on("error", (error48) => {
@@ -244231,6 +244589,1703 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
244231
244589
  return router;
244232
244590
  }
244233
244591
 
244592
+ // src/cli/dev/dev-server/watcher.ts
244593
+ import { basename as basename6, normalize as normalize2, relative as relative4 } from "node:path";
244594
+
244595
+ // node_modules/chokidar/index.js
244596
+ import { EventEmitter as EventEmitter3 } from "node:events";
244597
+ import { stat as statcb, Stats } from "node:fs";
244598
+ import { readdir as readdir3, stat as stat4 } from "node:fs/promises";
244599
+ import * as sp3 from "node:path";
244600
+
244601
+ // node_modules/readdirp/index.js
244602
+ import { lstat as lstat2, readdir as readdir2, realpath, stat as stat2 } from "node:fs/promises";
244603
+ import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
244604
+ import { Readable as Readable6 } from "node:stream";
244605
+ var EntryTypes = {
244606
+ FILE_TYPE: "files",
244607
+ DIR_TYPE: "directories",
244608
+ FILE_DIR_TYPE: "files_directories",
244609
+ EVERYTHING_TYPE: "all"
244610
+ };
244611
+ var defaultOptions = {
244612
+ root: ".",
244613
+ fileFilter: (_entryInfo) => true,
244614
+ directoryFilter: (_entryInfo) => true,
244615
+ type: EntryTypes.FILE_TYPE,
244616
+ lstat: false,
244617
+ depth: 2147483648,
244618
+ alwaysStat: false,
244619
+ highWaterMark: 4096
244620
+ };
244621
+ Object.freeze(defaultOptions);
244622
+ var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
244623
+ var NORMAL_FLOW_ERRORS = new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
244624
+ var ALL_TYPES = [
244625
+ EntryTypes.DIR_TYPE,
244626
+ EntryTypes.EVERYTHING_TYPE,
244627
+ EntryTypes.FILE_DIR_TYPE,
244628
+ EntryTypes.FILE_TYPE
244629
+ ];
244630
+ var DIR_TYPES = new Set([
244631
+ EntryTypes.DIR_TYPE,
244632
+ EntryTypes.EVERYTHING_TYPE,
244633
+ EntryTypes.FILE_DIR_TYPE
244634
+ ]);
244635
+ var FILE_TYPES2 = new Set([
244636
+ EntryTypes.EVERYTHING_TYPE,
244637
+ EntryTypes.FILE_DIR_TYPE,
244638
+ EntryTypes.FILE_TYPE
244639
+ ]);
244640
+ var isNormalFlowError = (error48) => NORMAL_FLOW_ERRORS.has(error48.code);
244641
+ var wantBigintFsStats = process.platform === "win32";
244642
+ var emptyFn = (_entryInfo) => true;
244643
+ var normalizeFilter = (filter2) => {
244644
+ if (filter2 === undefined)
244645
+ return emptyFn;
244646
+ if (typeof filter2 === "function")
244647
+ return filter2;
244648
+ if (typeof filter2 === "string") {
244649
+ const fl6 = filter2.trim();
244650
+ return (entry) => entry.basename === fl6;
244651
+ }
244652
+ if (Array.isArray(filter2)) {
244653
+ const trItems = filter2.map((item) => item.trim());
244654
+ return (entry) => trItems.some((f7) => entry.basename === f7);
244655
+ }
244656
+ return emptyFn;
244657
+ };
244658
+
244659
+ class ReaddirpStream extends Readable6 {
244660
+ parents;
244661
+ reading;
244662
+ parent;
244663
+ _stat;
244664
+ _maxDepth;
244665
+ _wantsDir;
244666
+ _wantsFile;
244667
+ _wantsEverything;
244668
+ _root;
244669
+ _isDirent;
244670
+ _statsProp;
244671
+ _rdOptions;
244672
+ _fileFilter;
244673
+ _directoryFilter;
244674
+ constructor(options8 = {}) {
244675
+ super({
244676
+ objectMode: true,
244677
+ autoDestroy: true,
244678
+ highWaterMark: options8.highWaterMark
244679
+ });
244680
+ const opts = { ...defaultOptions, ...options8 };
244681
+ const { root: root2, type } = opts;
244682
+ this._fileFilter = normalizeFilter(opts.fileFilter);
244683
+ this._directoryFilter = normalizeFilter(opts.directoryFilter);
244684
+ const statMethod = opts.lstat ? lstat2 : stat2;
244685
+ if (wantBigintFsStats) {
244686
+ this._stat = (path19) => statMethod(path19, { bigint: true });
244687
+ } else {
244688
+ this._stat = statMethod;
244689
+ }
244690
+ this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
244691
+ this._wantsDir = type ? DIR_TYPES.has(type) : false;
244692
+ this._wantsFile = type ? FILE_TYPES2.has(type) : false;
244693
+ this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
244694
+ this._root = presolve(root2);
244695
+ this._isDirent = !opts.alwaysStat;
244696
+ this._statsProp = this._isDirent ? "dirent" : "stats";
244697
+ this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
244698
+ this.parents = [this._exploreDir(root2, 1)];
244699
+ this.reading = false;
244700
+ this.parent = undefined;
244701
+ }
244702
+ async _read(batch) {
244703
+ if (this.reading)
244704
+ return;
244705
+ this.reading = true;
244706
+ try {
244707
+ while (!this.destroyed && batch > 0) {
244708
+ const par = this.parent;
244709
+ const fil = par && par.files;
244710
+ if (fil && fil.length > 0) {
244711
+ const { path: path19, depth } = par;
244712
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path19));
244713
+ const awaited = await Promise.all(slice);
244714
+ for (const entry of awaited) {
244715
+ if (!entry)
244716
+ continue;
244717
+ if (this.destroyed)
244718
+ return;
244719
+ const entryType = await this._getEntryType(entry);
244720
+ if (entryType === "directory" && this._directoryFilter(entry)) {
244721
+ if (depth <= this._maxDepth) {
244722
+ this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
244723
+ }
244724
+ if (this._wantsDir) {
244725
+ this.push(entry);
244726
+ batch--;
244727
+ }
244728
+ } else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
244729
+ if (this._wantsFile) {
244730
+ this.push(entry);
244731
+ batch--;
244732
+ }
244733
+ }
244734
+ }
244735
+ } else {
244736
+ const parent = this.parents.pop();
244737
+ if (!parent) {
244738
+ this.push(null);
244739
+ break;
244740
+ }
244741
+ this.parent = await parent;
244742
+ if (this.destroyed)
244743
+ return;
244744
+ }
244745
+ }
244746
+ } catch (error48) {
244747
+ this.destroy(error48);
244748
+ } finally {
244749
+ this.reading = false;
244750
+ }
244751
+ }
244752
+ async _exploreDir(path19, depth) {
244753
+ let files;
244754
+ try {
244755
+ files = await readdir2(path19, this._rdOptions);
244756
+ } catch (error48) {
244757
+ this._onError(error48);
244758
+ }
244759
+ return { files, depth, path: path19 };
244760
+ }
244761
+ async _formatEntry(dirent, path19) {
244762
+ let entry;
244763
+ const basename4 = this._isDirent ? dirent.name : dirent;
244764
+ try {
244765
+ const fullPath = presolve(pjoin(path19, basename4));
244766
+ entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
244767
+ entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
244768
+ } catch (err) {
244769
+ this._onError(err);
244770
+ return;
244771
+ }
244772
+ return entry;
244773
+ }
244774
+ _onError(err) {
244775
+ if (isNormalFlowError(err) && !this.destroyed) {
244776
+ this.emit("warn", err);
244777
+ } else {
244778
+ this.destroy(err);
244779
+ }
244780
+ }
244781
+ async _getEntryType(entry) {
244782
+ if (!entry && this._statsProp in entry) {
244783
+ return "";
244784
+ }
244785
+ const stats = entry[this._statsProp];
244786
+ if (stats.isFile())
244787
+ return "file";
244788
+ if (stats.isDirectory())
244789
+ return "directory";
244790
+ if (stats && stats.isSymbolicLink()) {
244791
+ const full = entry.fullPath;
244792
+ try {
244793
+ const entryRealPath = await realpath(full);
244794
+ const entryRealPathStats = await lstat2(entryRealPath);
244795
+ if (entryRealPathStats.isFile()) {
244796
+ return "file";
244797
+ }
244798
+ if (entryRealPathStats.isDirectory()) {
244799
+ const len = entryRealPath.length;
244800
+ if (full.startsWith(entryRealPath) && full.substr(len, 1) === psep) {
244801
+ const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
244802
+ recursiveError.code = RECURSIVE_ERROR_CODE;
244803
+ return this._onError(recursiveError);
244804
+ }
244805
+ return "directory";
244806
+ }
244807
+ } catch (error48) {
244808
+ this._onError(error48);
244809
+ return "";
244810
+ }
244811
+ }
244812
+ }
244813
+ _includeAsFile(entry) {
244814
+ const stats = entry && entry[this._statsProp];
244815
+ return stats && this._wantsEverything && !stats.isDirectory();
244816
+ }
244817
+ }
244818
+ function readdirp(root2, options8 = {}) {
244819
+ let type = options8.entryType || options8.type;
244820
+ if (type === "both")
244821
+ type = EntryTypes.FILE_DIR_TYPE;
244822
+ if (type)
244823
+ options8.type = type;
244824
+ if (!root2) {
244825
+ throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
244826
+ } else if (typeof root2 !== "string") {
244827
+ throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
244828
+ } else if (type && !ALL_TYPES.includes(type)) {
244829
+ throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
244830
+ }
244831
+ options8.root = root2;
244832
+ return new ReaddirpStream(options8);
244833
+ }
244834
+
244835
+ // node_modules/chokidar/handler.js
244836
+ import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
244837
+ import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat3 } from "node:fs/promises";
244838
+ import { type as osType } from "node:os";
244839
+ import * as sp2 from "node:path";
244840
+ var STR_DATA = "data";
244841
+ var STR_END = "end";
244842
+ var STR_CLOSE = "close";
244843
+ var EMPTY_FN = () => {};
244844
+ var pl6 = process.platform;
244845
+ var isWindows4 = pl6 === "win32";
244846
+ var isMacos = pl6 === "darwin";
244847
+ var isLinux = pl6 === "linux";
244848
+ var isFreeBSD = pl6 === "freebsd";
244849
+ var isIBMi = osType() === "OS400";
244850
+ var EVENTS = {
244851
+ ALL: "all",
244852
+ READY: "ready",
244853
+ ADD: "add",
244854
+ CHANGE: "change",
244855
+ ADD_DIR: "addDir",
244856
+ UNLINK: "unlink",
244857
+ UNLINK_DIR: "unlinkDir",
244858
+ RAW: "raw",
244859
+ ERROR: "error"
244860
+ };
244861
+ var EV = EVENTS;
244862
+ var THROTTLE_MODE_WATCH = "watch";
244863
+ var statMethods = { lstat: lstat3, stat: stat3 };
244864
+ var KEY_LISTENERS = "listeners";
244865
+ var KEY_ERR = "errHandlers";
244866
+ var KEY_RAW = "rawEmitters";
244867
+ var HANDLER_KEYS2 = [KEY_LISTENERS, KEY_ERR, KEY_RAW];
244868
+ var binaryExtensions = new Set([
244869
+ "3dm",
244870
+ "3ds",
244871
+ "3g2",
244872
+ "3gp",
244873
+ "7z",
244874
+ "a",
244875
+ "aac",
244876
+ "adp",
244877
+ "afdesign",
244878
+ "afphoto",
244879
+ "afpub",
244880
+ "ai",
244881
+ "aif",
244882
+ "aiff",
244883
+ "alz",
244884
+ "ape",
244885
+ "apk",
244886
+ "appimage",
244887
+ "ar",
244888
+ "arj",
244889
+ "asf",
244890
+ "au",
244891
+ "avi",
244892
+ "bak",
244893
+ "baml",
244894
+ "bh",
244895
+ "bin",
244896
+ "bk",
244897
+ "bmp",
244898
+ "btif",
244899
+ "bz2",
244900
+ "bzip2",
244901
+ "cab",
244902
+ "caf",
244903
+ "cgm",
244904
+ "class",
244905
+ "cmx",
244906
+ "cpio",
244907
+ "cr2",
244908
+ "cur",
244909
+ "dat",
244910
+ "dcm",
244911
+ "deb",
244912
+ "dex",
244913
+ "djvu",
244914
+ "dll",
244915
+ "dmg",
244916
+ "dng",
244917
+ "doc",
244918
+ "docm",
244919
+ "docx",
244920
+ "dot",
244921
+ "dotm",
244922
+ "dra",
244923
+ "DS_Store",
244924
+ "dsk",
244925
+ "dts",
244926
+ "dtshd",
244927
+ "dvb",
244928
+ "dwg",
244929
+ "dxf",
244930
+ "ecelp4800",
244931
+ "ecelp7470",
244932
+ "ecelp9600",
244933
+ "egg",
244934
+ "eol",
244935
+ "eot",
244936
+ "epub",
244937
+ "exe",
244938
+ "f4v",
244939
+ "fbs",
244940
+ "fh",
244941
+ "fla",
244942
+ "flac",
244943
+ "flatpak",
244944
+ "fli",
244945
+ "flv",
244946
+ "fpx",
244947
+ "fst",
244948
+ "fvt",
244949
+ "g3",
244950
+ "gh",
244951
+ "gif",
244952
+ "graffle",
244953
+ "gz",
244954
+ "gzip",
244955
+ "h261",
244956
+ "h263",
244957
+ "h264",
244958
+ "icns",
244959
+ "ico",
244960
+ "ief",
244961
+ "img",
244962
+ "ipa",
244963
+ "iso",
244964
+ "jar",
244965
+ "jpeg",
244966
+ "jpg",
244967
+ "jpgv",
244968
+ "jpm",
244969
+ "jxr",
244970
+ "key",
244971
+ "ktx",
244972
+ "lha",
244973
+ "lib",
244974
+ "lvp",
244975
+ "lz",
244976
+ "lzh",
244977
+ "lzma",
244978
+ "lzo",
244979
+ "m3u",
244980
+ "m4a",
244981
+ "m4v",
244982
+ "mar",
244983
+ "mdi",
244984
+ "mht",
244985
+ "mid",
244986
+ "midi",
244987
+ "mj2",
244988
+ "mka",
244989
+ "mkv",
244990
+ "mmr",
244991
+ "mng",
244992
+ "mobi",
244993
+ "mov",
244994
+ "movie",
244995
+ "mp3",
244996
+ "mp4",
244997
+ "mp4a",
244998
+ "mpeg",
244999
+ "mpg",
245000
+ "mpga",
245001
+ "mxu",
245002
+ "nef",
245003
+ "npx",
245004
+ "numbers",
245005
+ "nupkg",
245006
+ "o",
245007
+ "odp",
245008
+ "ods",
245009
+ "odt",
245010
+ "oga",
245011
+ "ogg",
245012
+ "ogv",
245013
+ "otf",
245014
+ "ott",
245015
+ "pages",
245016
+ "pbm",
245017
+ "pcx",
245018
+ "pdb",
245019
+ "pdf",
245020
+ "pea",
245021
+ "pgm",
245022
+ "pic",
245023
+ "png",
245024
+ "pnm",
245025
+ "pot",
245026
+ "potm",
245027
+ "potx",
245028
+ "ppa",
245029
+ "ppam",
245030
+ "ppm",
245031
+ "pps",
245032
+ "ppsm",
245033
+ "ppsx",
245034
+ "ppt",
245035
+ "pptm",
245036
+ "pptx",
245037
+ "psd",
245038
+ "pya",
245039
+ "pyc",
245040
+ "pyo",
245041
+ "pyv",
245042
+ "qt",
245043
+ "rar",
245044
+ "ras",
245045
+ "raw",
245046
+ "resources",
245047
+ "rgb",
245048
+ "rip",
245049
+ "rlc",
245050
+ "rmf",
245051
+ "rmvb",
245052
+ "rpm",
245053
+ "rtf",
245054
+ "rz",
245055
+ "s3m",
245056
+ "s7z",
245057
+ "scpt",
245058
+ "sgi",
245059
+ "shar",
245060
+ "snap",
245061
+ "sil",
245062
+ "sketch",
245063
+ "slk",
245064
+ "smv",
245065
+ "snk",
245066
+ "so",
245067
+ "stl",
245068
+ "suo",
245069
+ "sub",
245070
+ "swf",
245071
+ "tar",
245072
+ "tbz",
245073
+ "tbz2",
245074
+ "tga",
245075
+ "tgz",
245076
+ "thmx",
245077
+ "tif",
245078
+ "tiff",
245079
+ "tlz",
245080
+ "ttc",
245081
+ "ttf",
245082
+ "txz",
245083
+ "udf",
245084
+ "uvh",
245085
+ "uvi",
245086
+ "uvm",
245087
+ "uvp",
245088
+ "uvs",
245089
+ "uvu",
245090
+ "viv",
245091
+ "vob",
245092
+ "war",
245093
+ "wav",
245094
+ "wax",
245095
+ "wbmp",
245096
+ "wdp",
245097
+ "weba",
245098
+ "webm",
245099
+ "webp",
245100
+ "whl",
245101
+ "wim",
245102
+ "wm",
245103
+ "wma",
245104
+ "wmv",
245105
+ "wmx",
245106
+ "woff",
245107
+ "woff2",
245108
+ "wrm",
245109
+ "wvx",
245110
+ "xbm",
245111
+ "xif",
245112
+ "xla",
245113
+ "xlam",
245114
+ "xls",
245115
+ "xlsb",
245116
+ "xlsm",
245117
+ "xlsx",
245118
+ "xlt",
245119
+ "xltm",
245120
+ "xltx",
245121
+ "xm",
245122
+ "xmind",
245123
+ "xpi",
245124
+ "xpm",
245125
+ "xwd",
245126
+ "xz",
245127
+ "z",
245128
+ "zip",
245129
+ "zipx"
245130
+ ]);
245131
+ var isBinaryPath = (filePath) => binaryExtensions.has(sp2.extname(filePath).slice(1).toLowerCase());
245132
+ var foreach = (val, fn9) => {
245133
+ if (val instanceof Set) {
245134
+ val.forEach(fn9);
245135
+ } else {
245136
+ fn9(val);
245137
+ }
245138
+ };
245139
+ var addAndConvert = (main, prop, item) => {
245140
+ let container = main[prop];
245141
+ if (!(container instanceof Set)) {
245142
+ main[prop] = container = new Set([container]);
245143
+ }
245144
+ container.add(item);
245145
+ };
245146
+ var clearItem = (cont) => (key2) => {
245147
+ const set2 = cont[key2];
245148
+ if (set2 instanceof Set) {
245149
+ set2.clear();
245150
+ } else {
245151
+ delete cont[key2];
245152
+ }
245153
+ };
245154
+ var delFromSet = (main, prop, item) => {
245155
+ const container = main[prop];
245156
+ if (container instanceof Set) {
245157
+ container.delete(item);
245158
+ } else if (container === item) {
245159
+ delete main[prop];
245160
+ }
245161
+ };
245162
+ var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
245163
+ var FsWatchInstances = new Map;
245164
+ function createFsWatchInstance(path19, options8, listener, errHandler, emitRaw) {
245165
+ const handleEvent = (rawEvent, evPath) => {
245166
+ listener(path19);
245167
+ emitRaw(rawEvent, evPath, { watchedPath: path19 });
245168
+ if (evPath && path19 !== evPath) {
245169
+ fsWatchBroadcast(sp2.resolve(path19, evPath), KEY_LISTENERS, sp2.join(path19, evPath));
245170
+ }
245171
+ };
245172
+ try {
245173
+ return fs_watch(path19, {
245174
+ persistent: options8.persistent
245175
+ }, handleEvent);
245176
+ } catch (error48) {
245177
+ errHandler(error48);
245178
+ return;
245179
+ }
245180
+ }
245181
+ var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
245182
+ const cont = FsWatchInstances.get(fullPath);
245183
+ if (!cont)
245184
+ return;
245185
+ foreach(cont[listenerType], (listener) => {
245186
+ listener(val1, val2, val3);
245187
+ });
245188
+ };
245189
+ var setFsWatchListener = (path19, fullPath, options8, handlers) => {
245190
+ const { listener, errHandler, rawEmitter } = handlers;
245191
+ let cont = FsWatchInstances.get(fullPath);
245192
+ let watcher;
245193
+ if (!options8.persistent) {
245194
+ watcher = createFsWatchInstance(path19, options8, listener, errHandler, rawEmitter);
245195
+ if (!watcher)
245196
+ return;
245197
+ return watcher.close.bind(watcher);
245198
+ }
245199
+ if (cont) {
245200
+ addAndConvert(cont, KEY_LISTENERS, listener);
245201
+ addAndConvert(cont, KEY_ERR, errHandler);
245202
+ addAndConvert(cont, KEY_RAW, rawEmitter);
245203
+ } else {
245204
+ watcher = createFsWatchInstance(path19, options8, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
245205
+ if (!watcher)
245206
+ return;
245207
+ watcher.on(EV.ERROR, async (error48) => {
245208
+ const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
245209
+ if (cont)
245210
+ cont.watcherUnusable = true;
245211
+ if (isWindows4 && error48.code === "EPERM") {
245212
+ try {
245213
+ const fd = await open2(path19, "r");
245214
+ await fd.close();
245215
+ broadcastErr(error48);
245216
+ } catch (err) {}
245217
+ } else {
245218
+ broadcastErr(error48);
245219
+ }
245220
+ });
245221
+ cont = {
245222
+ listeners: listener,
245223
+ errHandlers: errHandler,
245224
+ rawEmitters: rawEmitter,
245225
+ watcher
245226
+ };
245227
+ FsWatchInstances.set(fullPath, cont);
245228
+ }
245229
+ return () => {
245230
+ delFromSet(cont, KEY_LISTENERS, listener);
245231
+ delFromSet(cont, KEY_ERR, errHandler);
245232
+ delFromSet(cont, KEY_RAW, rawEmitter);
245233
+ if (isEmptySet(cont.listeners)) {
245234
+ cont.watcher.close();
245235
+ FsWatchInstances.delete(fullPath);
245236
+ HANDLER_KEYS2.forEach(clearItem(cont));
245237
+ cont.watcher = undefined;
245238
+ Object.freeze(cont);
245239
+ }
245240
+ };
245241
+ };
245242
+ var FsWatchFileInstances = new Map;
245243
+ var setFsWatchFileListener = (path19, fullPath, options8, handlers) => {
245244
+ const { listener, rawEmitter } = handlers;
245245
+ let cont = FsWatchFileInstances.get(fullPath);
245246
+ const copts = cont && cont.options;
245247
+ if (copts && (copts.persistent < options8.persistent || copts.interval > options8.interval)) {
245248
+ unwatchFile(fullPath);
245249
+ cont = undefined;
245250
+ }
245251
+ if (cont) {
245252
+ addAndConvert(cont, KEY_LISTENERS, listener);
245253
+ addAndConvert(cont, KEY_RAW, rawEmitter);
245254
+ } else {
245255
+ cont = {
245256
+ listeners: listener,
245257
+ rawEmitters: rawEmitter,
245258
+ options: options8,
245259
+ watcher: watchFile(fullPath, options8, (curr, prev) => {
245260
+ foreach(cont.rawEmitters, (rawEmitter2) => {
245261
+ rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
245262
+ });
245263
+ const currmtime = curr.mtimeMs;
245264
+ if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
245265
+ foreach(cont.listeners, (listener2) => listener2(path19, curr));
245266
+ }
245267
+ })
245268
+ };
245269
+ FsWatchFileInstances.set(fullPath, cont);
245270
+ }
245271
+ return () => {
245272
+ delFromSet(cont, KEY_LISTENERS, listener);
245273
+ delFromSet(cont, KEY_RAW, rawEmitter);
245274
+ if (isEmptySet(cont.listeners)) {
245275
+ FsWatchFileInstances.delete(fullPath);
245276
+ unwatchFile(fullPath);
245277
+ cont.options = cont.watcher = undefined;
245278
+ Object.freeze(cont);
245279
+ }
245280
+ };
245281
+ };
245282
+
245283
+ class NodeFsHandler {
245284
+ fsw;
245285
+ _boundHandleError;
245286
+ constructor(fsW) {
245287
+ this.fsw = fsW;
245288
+ this._boundHandleError = (error48) => fsW._handleError(error48);
245289
+ }
245290
+ _watchWithNodeFs(path19, listener) {
245291
+ const opts = this.fsw.options;
245292
+ const directory = sp2.dirname(path19);
245293
+ const basename5 = sp2.basename(path19);
245294
+ const parent = this.fsw._getWatchedDir(directory);
245295
+ parent.add(basename5);
245296
+ const absolutePath = sp2.resolve(path19);
245297
+ const options8 = {
245298
+ persistent: opts.persistent
245299
+ };
245300
+ if (!listener)
245301
+ listener = EMPTY_FN;
245302
+ let closer;
245303
+ if (opts.usePolling) {
245304
+ const enableBin = opts.interval !== opts.binaryInterval;
245305
+ options8.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
245306
+ closer = setFsWatchFileListener(path19, absolutePath, options8, {
245307
+ listener,
245308
+ rawEmitter: this.fsw._emitRaw
245309
+ });
245310
+ } else {
245311
+ closer = setFsWatchListener(path19, absolutePath, options8, {
245312
+ listener,
245313
+ errHandler: this._boundHandleError,
245314
+ rawEmitter: this.fsw._emitRaw
245315
+ });
245316
+ }
245317
+ return closer;
245318
+ }
245319
+ _handleFile(file2, stats, initialAdd) {
245320
+ if (this.fsw.closed) {
245321
+ return;
245322
+ }
245323
+ const dirname13 = sp2.dirname(file2);
245324
+ const basename5 = sp2.basename(file2);
245325
+ const parent = this.fsw._getWatchedDir(dirname13);
245326
+ let prevStats = stats;
245327
+ if (parent.has(basename5))
245328
+ return;
245329
+ const listener = async (path19, newStats) => {
245330
+ if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
245331
+ return;
245332
+ if (!newStats || newStats.mtimeMs === 0) {
245333
+ try {
245334
+ const newStats2 = await stat3(file2);
245335
+ if (this.fsw.closed)
245336
+ return;
245337
+ const at13 = newStats2.atimeMs;
245338
+ const mt12 = newStats2.mtimeMs;
245339
+ if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
245340
+ this.fsw._emit(EV.CHANGE, file2, newStats2);
245341
+ }
245342
+ if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
245343
+ this.fsw._closeFile(path19);
245344
+ prevStats = newStats2;
245345
+ const closer2 = this._watchWithNodeFs(file2, listener);
245346
+ if (closer2)
245347
+ this.fsw._addPathCloser(path19, closer2);
245348
+ } else {
245349
+ prevStats = newStats2;
245350
+ }
245351
+ } catch (error48) {
245352
+ this.fsw._remove(dirname13, basename5);
245353
+ }
245354
+ } else if (parent.has(basename5)) {
245355
+ const at13 = newStats.atimeMs;
245356
+ const mt12 = newStats.mtimeMs;
245357
+ if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
245358
+ this.fsw._emit(EV.CHANGE, file2, newStats);
245359
+ }
245360
+ prevStats = newStats;
245361
+ }
245362
+ };
245363
+ const closer = this._watchWithNodeFs(file2, listener);
245364
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file2)) {
245365
+ if (!this.fsw._throttle(EV.ADD, file2, 0))
245366
+ return;
245367
+ this.fsw._emit(EV.ADD, file2, stats);
245368
+ }
245369
+ return closer;
245370
+ }
245371
+ async _handleSymlink(entry, directory, path19, item) {
245372
+ if (this.fsw.closed) {
245373
+ return;
245374
+ }
245375
+ const full = entry.fullPath;
245376
+ const dir = this.fsw._getWatchedDir(directory);
245377
+ if (!this.fsw.options.followSymlinks) {
245378
+ this.fsw._incrReadyCount();
245379
+ let linkPath;
245380
+ try {
245381
+ linkPath = await fsrealpath(path19);
245382
+ } catch (e8) {
245383
+ this.fsw._emitReady();
245384
+ return true;
245385
+ }
245386
+ if (this.fsw.closed)
245387
+ return;
245388
+ if (dir.has(item)) {
245389
+ if (this.fsw._symlinkPaths.get(full) !== linkPath) {
245390
+ this.fsw._symlinkPaths.set(full, linkPath);
245391
+ this.fsw._emit(EV.CHANGE, path19, entry.stats);
245392
+ }
245393
+ } else {
245394
+ dir.add(item);
245395
+ this.fsw._symlinkPaths.set(full, linkPath);
245396
+ this.fsw._emit(EV.ADD, path19, entry.stats);
245397
+ }
245398
+ this.fsw._emitReady();
245399
+ return true;
245400
+ }
245401
+ if (this.fsw._symlinkPaths.has(full)) {
245402
+ return true;
245403
+ }
245404
+ this.fsw._symlinkPaths.set(full, true);
245405
+ }
245406
+ _handleRead(directory, initialAdd, wh2, target, dir, depth, throttler) {
245407
+ directory = sp2.join(directory, "");
245408
+ const throttleKey = target ? `${directory}:${target}` : directory;
245409
+ throttler = this.fsw._throttle("readdir", throttleKey, 1000);
245410
+ if (!throttler)
245411
+ return;
245412
+ const previous = this.fsw._getWatchedDir(wh2.path);
245413
+ const current = new Set;
245414
+ let stream = this.fsw._readdirp(directory, {
245415
+ fileFilter: (entry) => wh2.filterPath(entry),
245416
+ directoryFilter: (entry) => wh2.filterDir(entry)
245417
+ });
245418
+ if (!stream)
245419
+ return;
245420
+ stream.on(STR_DATA, async (entry) => {
245421
+ if (this.fsw.closed) {
245422
+ stream = undefined;
245423
+ return;
245424
+ }
245425
+ const item = entry.path;
245426
+ let path19 = sp2.join(directory, item);
245427
+ current.add(item);
245428
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path19, item)) {
245429
+ return;
245430
+ }
245431
+ if (this.fsw.closed) {
245432
+ stream = undefined;
245433
+ return;
245434
+ }
245435
+ if (item === target || !target && !previous.has(item)) {
245436
+ this.fsw._incrReadyCount();
245437
+ path19 = sp2.join(dir, sp2.relative(dir, path19));
245438
+ this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
245439
+ }
245440
+ }).on(EV.ERROR, this._boundHandleError);
245441
+ return new Promise((resolve7, reject) => {
245442
+ if (!stream)
245443
+ return reject();
245444
+ stream.once(STR_END, () => {
245445
+ if (this.fsw.closed) {
245446
+ stream = undefined;
245447
+ return;
245448
+ }
245449
+ const wasThrottled = throttler ? throttler.clear() : false;
245450
+ resolve7(undefined);
245451
+ previous.getChildren().filter((item) => {
245452
+ return item !== directory && !current.has(item);
245453
+ }).forEach((item) => {
245454
+ this.fsw._remove(directory, item);
245455
+ });
245456
+ stream = undefined;
245457
+ if (wasThrottled)
245458
+ this._handleRead(directory, false, wh2, target, dir, depth, throttler);
245459
+ });
245460
+ });
245461
+ }
245462
+ async _handleDir(dir, stats, initialAdd, depth, target, wh2, realpath2) {
245463
+ const parentDir = this.fsw._getWatchedDir(sp2.dirname(dir));
245464
+ const tracked = parentDir.has(sp2.basename(dir));
245465
+ if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
245466
+ this.fsw._emit(EV.ADD_DIR, dir, stats);
245467
+ }
245468
+ parentDir.add(sp2.basename(dir));
245469
+ this.fsw._getWatchedDir(dir);
245470
+ let throttler;
245471
+ let closer;
245472
+ const oDepth = this.fsw.options.depth;
245473
+ if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
245474
+ if (!target) {
245475
+ await this._handleRead(dir, initialAdd, wh2, target, dir, depth, throttler);
245476
+ if (this.fsw.closed)
245477
+ return;
245478
+ }
245479
+ closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
245480
+ if (stats2 && stats2.mtimeMs === 0)
245481
+ return;
245482
+ this._handleRead(dirPath, false, wh2, target, dir, depth, throttler);
245483
+ });
245484
+ }
245485
+ return closer;
245486
+ }
245487
+ async _addToNodeFs(path19, initialAdd, priorWh, depth, target) {
245488
+ const ready = this.fsw._emitReady;
245489
+ if (this.fsw._isIgnored(path19) || this.fsw.closed) {
245490
+ ready();
245491
+ return false;
245492
+ }
245493
+ const wh2 = this.fsw._getWatchHelpers(path19);
245494
+ if (priorWh) {
245495
+ wh2.filterPath = (entry) => priorWh.filterPath(entry);
245496
+ wh2.filterDir = (entry) => priorWh.filterDir(entry);
245497
+ }
245498
+ try {
245499
+ const stats = await statMethods[wh2.statMethod](wh2.watchPath);
245500
+ if (this.fsw.closed)
245501
+ return;
245502
+ if (this.fsw._isIgnored(wh2.watchPath, stats)) {
245503
+ ready();
245504
+ return false;
245505
+ }
245506
+ const follow = this.fsw.options.followSymlinks;
245507
+ let closer;
245508
+ if (stats.isDirectory()) {
245509
+ const absPath = sp2.resolve(path19);
245510
+ const targetPath = follow ? await fsrealpath(path19) : path19;
245511
+ if (this.fsw.closed)
245512
+ return;
245513
+ closer = await this._handleDir(wh2.watchPath, stats, initialAdd, depth, target, wh2, targetPath);
245514
+ if (this.fsw.closed)
245515
+ return;
245516
+ if (absPath !== targetPath && targetPath !== undefined) {
245517
+ this.fsw._symlinkPaths.set(absPath, targetPath);
245518
+ }
245519
+ } else if (stats.isSymbolicLink()) {
245520
+ const targetPath = follow ? await fsrealpath(path19) : path19;
245521
+ if (this.fsw.closed)
245522
+ return;
245523
+ const parent = sp2.dirname(wh2.watchPath);
245524
+ this.fsw._getWatchedDir(parent).add(wh2.watchPath);
245525
+ this.fsw._emit(EV.ADD, wh2.watchPath, stats);
245526
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path19, wh2, targetPath);
245527
+ if (this.fsw.closed)
245528
+ return;
245529
+ if (targetPath !== undefined) {
245530
+ this.fsw._symlinkPaths.set(sp2.resolve(path19), targetPath);
245531
+ }
245532
+ } else {
245533
+ closer = this._handleFile(wh2.watchPath, stats, initialAdd);
245534
+ }
245535
+ ready();
245536
+ if (closer)
245537
+ this.fsw._addPathCloser(path19, closer);
245538
+ return false;
245539
+ } catch (error48) {
245540
+ if (this.fsw._handleError(error48)) {
245541
+ ready();
245542
+ return path19;
245543
+ }
245544
+ }
245545
+ }
245546
+ }
245547
+
245548
+ // node_modules/chokidar/index.js
245549
+ /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
245550
+ var SLASH = "/";
245551
+ var SLASH_SLASH = "//";
245552
+ var ONE_DOT = ".";
245553
+ var TWO_DOTS = "..";
245554
+ var STRING_TYPE = "string";
245555
+ var BACK_SLASH_RE = /\\/g;
245556
+ var DOUBLE_SLASH_RE = /\/\//g;
245557
+ var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
245558
+ var REPLACER_RE = /^\.[/\\]/;
245559
+ function arrify(item) {
245560
+ return Array.isArray(item) ? item : [item];
245561
+ }
245562
+ var isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
245563
+ function createPattern(matcher) {
245564
+ if (typeof matcher === "function")
245565
+ return matcher;
245566
+ if (typeof matcher === "string")
245567
+ return (string4) => matcher === string4;
245568
+ if (matcher instanceof RegExp)
245569
+ return (string4) => matcher.test(string4);
245570
+ if (typeof matcher === "object" && matcher !== null) {
245571
+ return (string4) => {
245572
+ if (matcher.path === string4)
245573
+ return true;
245574
+ if (matcher.recursive) {
245575
+ const relative4 = sp3.relative(matcher.path, string4);
245576
+ if (!relative4) {
245577
+ return false;
245578
+ }
245579
+ return !relative4.startsWith("..") && !sp3.isAbsolute(relative4);
245580
+ }
245581
+ return false;
245582
+ };
245583
+ }
245584
+ return () => false;
245585
+ }
245586
+ function normalizePath(path19) {
245587
+ if (typeof path19 !== "string")
245588
+ throw new Error("string expected");
245589
+ path19 = sp3.normalize(path19);
245590
+ path19 = path19.replace(/\\/g, "/");
245591
+ let prepend = false;
245592
+ if (path19.startsWith("//"))
245593
+ prepend = true;
245594
+ path19 = path19.replace(DOUBLE_SLASH_RE, "/");
245595
+ if (prepend)
245596
+ path19 = "/" + path19;
245597
+ return path19;
245598
+ }
245599
+ function matchPatterns(patterns, testString, stats) {
245600
+ const path19 = normalizePath(testString);
245601
+ for (let index = 0;index < patterns.length; index++) {
245602
+ const pattern = patterns[index];
245603
+ if (pattern(path19, stats)) {
245604
+ return true;
245605
+ }
245606
+ }
245607
+ return false;
245608
+ }
245609
+ function anymatch(matchers, testString) {
245610
+ if (matchers == null) {
245611
+ throw new TypeError("anymatch: specify first argument");
245612
+ }
245613
+ const matchersArray = arrify(matchers);
245614
+ const patterns = matchersArray.map((matcher) => createPattern(matcher));
245615
+ if (testString == null) {
245616
+ return (testString2, stats) => {
245617
+ return matchPatterns(patterns, testString2, stats);
245618
+ };
245619
+ }
245620
+ return matchPatterns(patterns, testString);
245621
+ }
245622
+ var unifyPaths = (paths_) => {
245623
+ const paths = arrify(paths_).flat();
245624
+ if (!paths.every((p4) => typeof p4 === STRING_TYPE)) {
245625
+ throw new TypeError(`Non-string provided as watch path: ${paths}`);
245626
+ }
245627
+ return paths.map(normalizePathToUnix);
245628
+ };
245629
+ var toUnix = (string4) => {
245630
+ let str = string4.replace(BACK_SLASH_RE, SLASH);
245631
+ let prepend = false;
245632
+ if (str.startsWith(SLASH_SLASH)) {
245633
+ prepend = true;
245634
+ }
245635
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
245636
+ if (prepend) {
245637
+ str = SLASH + str;
245638
+ }
245639
+ return str;
245640
+ };
245641
+ var normalizePathToUnix = (path19) => toUnix(sp3.normalize(toUnix(path19)));
245642
+ var normalizeIgnored = (cwd = "") => (path19) => {
245643
+ if (typeof path19 === "string") {
245644
+ return normalizePathToUnix(sp3.isAbsolute(path19) ? path19 : sp3.join(cwd, path19));
245645
+ } else {
245646
+ return path19;
245647
+ }
245648
+ };
245649
+ var getAbsolutePath = (path19, cwd) => {
245650
+ if (sp3.isAbsolute(path19)) {
245651
+ return path19;
245652
+ }
245653
+ return sp3.join(cwd, path19);
245654
+ };
245655
+ var EMPTY_SET = Object.freeze(new Set);
245656
+
245657
+ class DirEntry {
245658
+ path;
245659
+ _removeWatcher;
245660
+ items;
245661
+ constructor(dir, removeWatcher) {
245662
+ this.path = dir;
245663
+ this._removeWatcher = removeWatcher;
245664
+ this.items = new Set;
245665
+ }
245666
+ add(item) {
245667
+ const { items } = this;
245668
+ if (!items)
245669
+ return;
245670
+ if (item !== ONE_DOT && item !== TWO_DOTS)
245671
+ items.add(item);
245672
+ }
245673
+ async remove(item) {
245674
+ const { items } = this;
245675
+ if (!items)
245676
+ return;
245677
+ items.delete(item);
245678
+ if (items.size > 0)
245679
+ return;
245680
+ const dir = this.path;
245681
+ try {
245682
+ await readdir3(dir);
245683
+ } catch (err) {
245684
+ if (this._removeWatcher) {
245685
+ this._removeWatcher(sp3.dirname(dir), sp3.basename(dir));
245686
+ }
245687
+ }
245688
+ }
245689
+ has(item) {
245690
+ const { items } = this;
245691
+ if (!items)
245692
+ return;
245693
+ return items.has(item);
245694
+ }
245695
+ getChildren() {
245696
+ const { items } = this;
245697
+ if (!items)
245698
+ return [];
245699
+ return [...items.values()];
245700
+ }
245701
+ dispose() {
245702
+ this.items.clear();
245703
+ this.path = "";
245704
+ this._removeWatcher = EMPTY_FN;
245705
+ this.items = EMPTY_SET;
245706
+ Object.freeze(this);
245707
+ }
245708
+ }
245709
+ var STAT_METHOD_F = "stat";
245710
+ var STAT_METHOD_L = "lstat";
245711
+
245712
+ class WatchHelper {
245713
+ fsw;
245714
+ path;
245715
+ watchPath;
245716
+ fullWatchPath;
245717
+ dirParts;
245718
+ followSymlinks;
245719
+ statMethod;
245720
+ constructor(path19, follow, fsw) {
245721
+ this.fsw = fsw;
245722
+ const watchPath = path19;
245723
+ this.path = path19 = path19.replace(REPLACER_RE, "");
245724
+ this.watchPath = watchPath;
245725
+ this.fullWatchPath = sp3.resolve(watchPath);
245726
+ this.dirParts = [];
245727
+ this.dirParts.forEach((parts) => {
245728
+ if (parts.length > 1)
245729
+ parts.pop();
245730
+ });
245731
+ this.followSymlinks = follow;
245732
+ this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
245733
+ }
245734
+ entryPath(entry) {
245735
+ return sp3.join(this.watchPath, sp3.relative(this.watchPath, entry.fullPath));
245736
+ }
245737
+ filterPath(entry) {
245738
+ const { stats } = entry;
245739
+ if (stats && stats.isSymbolicLink())
245740
+ return this.filterDir(entry);
245741
+ const resolvedPath = this.entryPath(entry);
245742
+ return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
245743
+ }
245744
+ filterDir(entry) {
245745
+ return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
245746
+ }
245747
+ }
245748
+
245749
+ class FSWatcher extends EventEmitter3 {
245750
+ closed;
245751
+ options;
245752
+ _closers;
245753
+ _ignoredPaths;
245754
+ _throttled;
245755
+ _streams;
245756
+ _symlinkPaths;
245757
+ _watched;
245758
+ _pendingWrites;
245759
+ _pendingUnlinks;
245760
+ _readyCount;
245761
+ _emitReady;
245762
+ _closePromise;
245763
+ _userIgnored;
245764
+ _readyEmitted;
245765
+ _emitRaw;
245766
+ _boundRemove;
245767
+ _nodeFsHandler;
245768
+ constructor(_opts = {}) {
245769
+ super();
245770
+ this.closed = false;
245771
+ this._closers = new Map;
245772
+ this._ignoredPaths = new Set;
245773
+ this._throttled = new Map;
245774
+ this._streams = new Set;
245775
+ this._symlinkPaths = new Map;
245776
+ this._watched = new Map;
245777
+ this._pendingWrites = new Map;
245778
+ this._pendingUnlinks = new Map;
245779
+ this._readyCount = 0;
245780
+ this._readyEmitted = false;
245781
+ const awf = _opts.awaitWriteFinish;
245782
+ const DEF_AWF = { stabilityThreshold: 2000, pollInterval: 100 };
245783
+ const opts = {
245784
+ persistent: true,
245785
+ ignoreInitial: false,
245786
+ ignorePermissionErrors: false,
245787
+ interval: 100,
245788
+ binaryInterval: 300,
245789
+ followSymlinks: true,
245790
+ usePolling: false,
245791
+ atomic: true,
245792
+ ..._opts,
245793
+ ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
245794
+ awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? { ...DEF_AWF, ...awf } : false
245795
+ };
245796
+ if (isIBMi)
245797
+ opts.usePolling = true;
245798
+ if (opts.atomic === undefined)
245799
+ opts.atomic = !opts.usePolling;
245800
+ const envPoll = process.env.CHOKIDAR_USEPOLLING;
245801
+ if (envPoll !== undefined) {
245802
+ const envLower = envPoll.toLowerCase();
245803
+ if (envLower === "false" || envLower === "0")
245804
+ opts.usePolling = false;
245805
+ else if (envLower === "true" || envLower === "1")
245806
+ opts.usePolling = true;
245807
+ else
245808
+ opts.usePolling = !!envLower;
245809
+ }
245810
+ const envInterval = process.env.CHOKIDAR_INTERVAL;
245811
+ if (envInterval)
245812
+ opts.interval = Number.parseInt(envInterval, 10);
245813
+ let readyCalls = 0;
245814
+ this._emitReady = () => {
245815
+ readyCalls++;
245816
+ if (readyCalls >= this._readyCount) {
245817
+ this._emitReady = EMPTY_FN;
245818
+ this._readyEmitted = true;
245819
+ process.nextTick(() => this.emit(EVENTS.READY));
245820
+ }
245821
+ };
245822
+ this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
245823
+ this._boundRemove = this._remove.bind(this);
245824
+ this.options = opts;
245825
+ this._nodeFsHandler = new NodeFsHandler(this);
245826
+ Object.freeze(opts);
245827
+ }
245828
+ _addIgnoredPath(matcher) {
245829
+ if (isMatcherObject(matcher)) {
245830
+ for (const ignored of this._ignoredPaths) {
245831
+ if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
245832
+ return;
245833
+ }
245834
+ }
245835
+ }
245836
+ this._ignoredPaths.add(matcher);
245837
+ }
245838
+ _removeIgnoredPath(matcher) {
245839
+ this._ignoredPaths.delete(matcher);
245840
+ if (typeof matcher === "string") {
245841
+ for (const ignored of this._ignoredPaths) {
245842
+ if (isMatcherObject(ignored) && ignored.path === matcher) {
245843
+ this._ignoredPaths.delete(ignored);
245844
+ }
245845
+ }
245846
+ }
245847
+ }
245848
+ add(paths_, _origAdd, _internal) {
245849
+ const { cwd } = this.options;
245850
+ this.closed = false;
245851
+ this._closePromise = undefined;
245852
+ let paths = unifyPaths(paths_);
245853
+ if (cwd) {
245854
+ paths = paths.map((path19) => {
245855
+ const absPath = getAbsolutePath(path19, cwd);
245856
+ return absPath;
245857
+ });
245858
+ }
245859
+ paths.forEach((path19) => {
245860
+ this._removeIgnoredPath(path19);
245861
+ });
245862
+ this._userIgnored = undefined;
245863
+ if (!this._readyCount)
245864
+ this._readyCount = 0;
245865
+ this._readyCount += paths.length;
245866
+ Promise.all(paths.map(async (path19) => {
245867
+ const res = await this._nodeFsHandler._addToNodeFs(path19, !_internal, undefined, 0, _origAdd);
245868
+ if (res)
245869
+ this._emitReady();
245870
+ return res;
245871
+ })).then((results) => {
245872
+ if (this.closed)
245873
+ return;
245874
+ results.forEach((item) => {
245875
+ if (item)
245876
+ this.add(sp3.dirname(item), sp3.basename(_origAdd || item));
245877
+ });
245878
+ });
245879
+ return this;
245880
+ }
245881
+ unwatch(paths_) {
245882
+ if (this.closed)
245883
+ return this;
245884
+ const paths = unifyPaths(paths_);
245885
+ const { cwd } = this.options;
245886
+ paths.forEach((path19) => {
245887
+ if (!sp3.isAbsolute(path19) && !this._closers.has(path19)) {
245888
+ if (cwd)
245889
+ path19 = sp3.join(cwd, path19);
245890
+ path19 = sp3.resolve(path19);
245891
+ }
245892
+ this._closePath(path19);
245893
+ this._addIgnoredPath(path19);
245894
+ if (this._watched.has(path19)) {
245895
+ this._addIgnoredPath({
245896
+ path: path19,
245897
+ recursive: true
245898
+ });
245899
+ }
245900
+ this._userIgnored = undefined;
245901
+ });
245902
+ return this;
245903
+ }
245904
+ close() {
245905
+ if (this._closePromise) {
245906
+ return this._closePromise;
245907
+ }
245908
+ this.closed = true;
245909
+ this.removeAllListeners();
245910
+ const closers = [];
245911
+ this._closers.forEach((closerList) => closerList.forEach((closer) => {
245912
+ const promise2 = closer();
245913
+ if (promise2 instanceof Promise)
245914
+ closers.push(promise2);
245915
+ }));
245916
+ this._streams.forEach((stream) => stream.destroy());
245917
+ this._userIgnored = undefined;
245918
+ this._readyCount = 0;
245919
+ this._readyEmitted = false;
245920
+ this._watched.forEach((dirent) => dirent.dispose());
245921
+ this._closers.clear();
245922
+ this._watched.clear();
245923
+ this._streams.clear();
245924
+ this._symlinkPaths.clear();
245925
+ this._throttled.clear();
245926
+ this._closePromise = closers.length ? Promise.all(closers).then(() => {
245927
+ return;
245928
+ }) : Promise.resolve();
245929
+ return this._closePromise;
245930
+ }
245931
+ getWatched() {
245932
+ const watchList = {};
245933
+ this._watched.forEach((entry, dir) => {
245934
+ const key2 = this.options.cwd ? sp3.relative(this.options.cwd, dir) : dir;
245935
+ const index = key2 || ONE_DOT;
245936
+ watchList[index] = entry.getChildren().sort();
245937
+ });
245938
+ return watchList;
245939
+ }
245940
+ emitWithAll(event, args) {
245941
+ this.emit(event, ...args);
245942
+ if (event !== EVENTS.ERROR)
245943
+ this.emit(EVENTS.ALL, event, ...args);
245944
+ }
245945
+ async _emit(event, path19, stats) {
245946
+ if (this.closed)
245947
+ return;
245948
+ const opts = this.options;
245949
+ if (isWindows4)
245950
+ path19 = sp3.normalize(path19);
245951
+ if (opts.cwd)
245952
+ path19 = sp3.relative(opts.cwd, path19);
245953
+ const args = [path19];
245954
+ if (stats != null)
245955
+ args.push(stats);
245956
+ const awf = opts.awaitWriteFinish;
245957
+ let pw;
245958
+ if (awf && (pw = this._pendingWrites.get(path19))) {
245959
+ pw.lastChange = new Date;
245960
+ return this;
245961
+ }
245962
+ if (opts.atomic) {
245963
+ if (event === EVENTS.UNLINK) {
245964
+ this._pendingUnlinks.set(path19, [event, ...args]);
245965
+ setTimeout(() => {
245966
+ this._pendingUnlinks.forEach((entry, path20) => {
245967
+ this.emit(...entry);
245968
+ this.emit(EVENTS.ALL, ...entry);
245969
+ this._pendingUnlinks.delete(path20);
245970
+ });
245971
+ }, typeof opts.atomic === "number" ? opts.atomic : 100);
245972
+ return this;
245973
+ }
245974
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path19)) {
245975
+ event = EVENTS.CHANGE;
245976
+ this._pendingUnlinks.delete(path19);
245977
+ }
245978
+ }
245979
+ if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
245980
+ const awfEmit = (err, stats2) => {
245981
+ if (err) {
245982
+ event = EVENTS.ERROR;
245983
+ args[0] = err;
245984
+ this.emitWithAll(event, args);
245985
+ } else if (stats2) {
245986
+ if (args.length > 1) {
245987
+ args[1] = stats2;
245988
+ } else {
245989
+ args.push(stats2);
245990
+ }
245991
+ this.emitWithAll(event, args);
245992
+ }
245993
+ };
245994
+ this._awaitWriteFinish(path19, awf.stabilityThreshold, event, awfEmit);
245995
+ return this;
245996
+ }
245997
+ if (event === EVENTS.CHANGE) {
245998
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path19, 50);
245999
+ if (isThrottled)
246000
+ return this;
246001
+ }
246002
+ if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
246003
+ const fullPath = opts.cwd ? sp3.join(opts.cwd, path19) : path19;
246004
+ let stats2;
246005
+ try {
246006
+ stats2 = await stat4(fullPath);
246007
+ } catch (err) {}
246008
+ if (!stats2 || this.closed)
246009
+ return;
246010
+ args.push(stats2);
246011
+ }
246012
+ this.emitWithAll(event, args);
246013
+ return this;
246014
+ }
246015
+ _handleError(error48) {
246016
+ const code2 = error48 && error48.code;
246017
+ if (error48 && code2 !== "ENOENT" && code2 !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code2 !== "EPERM" && code2 !== "EACCES")) {
246018
+ this.emit(EVENTS.ERROR, error48);
246019
+ }
246020
+ return error48 || this.closed;
246021
+ }
246022
+ _throttle(actionType, path19, timeout3) {
246023
+ if (!this._throttled.has(actionType)) {
246024
+ this._throttled.set(actionType, new Map);
246025
+ }
246026
+ const action = this._throttled.get(actionType);
246027
+ if (!action)
246028
+ throw new Error("invalid throttle");
246029
+ const actionPath = action.get(path19);
246030
+ if (actionPath) {
246031
+ actionPath.count++;
246032
+ return false;
246033
+ }
246034
+ let timeoutObject;
246035
+ const clear = () => {
246036
+ const item = action.get(path19);
246037
+ const count2 = item ? item.count : 0;
246038
+ action.delete(path19);
246039
+ clearTimeout(timeoutObject);
246040
+ if (item)
246041
+ clearTimeout(item.timeoutObject);
246042
+ return count2;
246043
+ };
246044
+ timeoutObject = setTimeout(clear, timeout3);
246045
+ const thr = { timeoutObject, clear, count: 0 };
246046
+ action.set(path19, thr);
246047
+ return thr;
246048
+ }
246049
+ _incrReadyCount() {
246050
+ return this._readyCount++;
246051
+ }
246052
+ _awaitWriteFinish(path19, threshold, event, awfEmit) {
246053
+ const awf = this.options.awaitWriteFinish;
246054
+ if (typeof awf !== "object")
246055
+ return;
246056
+ const pollInterval = awf.pollInterval;
246057
+ let timeoutHandler;
246058
+ let fullPath = path19;
246059
+ if (this.options.cwd && !sp3.isAbsolute(path19)) {
246060
+ fullPath = sp3.join(this.options.cwd, path19);
246061
+ }
246062
+ const now = new Date;
246063
+ const writes = this._pendingWrites;
246064
+ function awaitWriteFinishFn(prevStat) {
246065
+ statcb(fullPath, (err, curStat) => {
246066
+ if (err || !writes.has(path19)) {
246067
+ if (err && err.code !== "ENOENT")
246068
+ awfEmit(err);
246069
+ return;
246070
+ }
246071
+ const now2 = Number(new Date);
246072
+ if (prevStat && curStat.size !== prevStat.size) {
246073
+ writes.get(path19).lastChange = now2;
246074
+ }
246075
+ const pw = writes.get(path19);
246076
+ const df3 = now2 - pw.lastChange;
246077
+ if (df3 >= threshold) {
246078
+ writes.delete(path19);
246079
+ awfEmit(undefined, curStat);
246080
+ } else {
246081
+ timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
246082
+ }
246083
+ });
246084
+ }
246085
+ if (!writes.has(path19)) {
246086
+ writes.set(path19, {
246087
+ lastChange: now,
246088
+ cancelWait: () => {
246089
+ writes.delete(path19);
246090
+ clearTimeout(timeoutHandler);
246091
+ return event;
246092
+ }
246093
+ });
246094
+ timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
246095
+ }
246096
+ }
246097
+ _isIgnored(path19, stats) {
246098
+ if (this.options.atomic && DOT_RE.test(path19))
246099
+ return true;
246100
+ if (!this._userIgnored) {
246101
+ const { cwd } = this.options;
246102
+ const ign = this.options.ignored;
246103
+ const ignored = (ign || []).map(normalizeIgnored(cwd));
246104
+ const ignoredPaths = [...this._ignoredPaths];
246105
+ const list3 = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
246106
+ this._userIgnored = anymatch(list3, undefined);
246107
+ }
246108
+ return this._userIgnored(path19, stats);
246109
+ }
246110
+ _isntIgnored(path19, stat5) {
246111
+ return !this._isIgnored(path19, stat5);
246112
+ }
246113
+ _getWatchHelpers(path19) {
246114
+ return new WatchHelper(path19, this.options.followSymlinks, this);
246115
+ }
246116
+ _getWatchedDir(directory) {
246117
+ const dir = sp3.resolve(directory);
246118
+ if (!this._watched.has(dir))
246119
+ this._watched.set(dir, new DirEntry(dir, this._boundRemove));
246120
+ return this._watched.get(dir);
246121
+ }
246122
+ _hasReadPermissions(stats) {
246123
+ if (this.options.ignorePermissionErrors)
246124
+ return true;
246125
+ return Boolean(Number(stats.mode) & 256);
246126
+ }
246127
+ _remove(directory, item, isDirectory3) {
246128
+ const path19 = sp3.join(directory, item);
246129
+ const fullPath = sp3.resolve(path19);
246130
+ isDirectory3 = isDirectory3 != null ? isDirectory3 : this._watched.has(path19) || this._watched.has(fullPath);
246131
+ if (!this._throttle("remove", path19, 100))
246132
+ return;
246133
+ if (!isDirectory3 && this._watched.size === 1) {
246134
+ this.add(directory, item, true);
246135
+ }
246136
+ const wp5 = this._getWatchedDir(path19);
246137
+ const nestedDirectoryChildren = wp5.getChildren();
246138
+ nestedDirectoryChildren.forEach((nested) => this._remove(path19, nested));
246139
+ const parent = this._getWatchedDir(directory);
246140
+ const wasTracked = parent.has(item);
246141
+ parent.remove(item);
246142
+ if (this._symlinkPaths.has(fullPath)) {
246143
+ this._symlinkPaths.delete(fullPath);
246144
+ }
246145
+ let relPath = path19;
246146
+ if (this.options.cwd)
246147
+ relPath = sp3.relative(this.options.cwd, path19);
246148
+ if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
246149
+ const event = this._pendingWrites.get(relPath).cancelWait();
246150
+ if (event === EVENTS.ADD)
246151
+ return;
246152
+ }
246153
+ this._watched.delete(path19);
246154
+ this._watched.delete(fullPath);
246155
+ const eventName = isDirectory3 ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
246156
+ if (wasTracked && !this._isIgnored(path19))
246157
+ this._emit(eventName, path19);
246158
+ this._closePath(path19);
246159
+ }
246160
+ _closePath(path19) {
246161
+ this._closeFile(path19);
246162
+ const dir = sp3.dirname(path19);
246163
+ this._getWatchedDir(dir).remove(sp3.basename(path19));
246164
+ }
246165
+ _closeFile(path19) {
246166
+ const closers = this._closers.get(path19);
246167
+ if (!closers)
246168
+ return;
246169
+ closers.forEach((closer) => closer());
246170
+ this._closers.delete(path19);
246171
+ }
246172
+ _addPathCloser(path19, closer) {
246173
+ if (!closer)
246174
+ return;
246175
+ let list3 = this._closers.get(path19);
246176
+ if (!list3) {
246177
+ list3 = [];
246178
+ this._closers.set(path19, list3);
246179
+ }
246180
+ list3.push(closer);
246181
+ }
246182
+ _readdirp(root2, opts) {
246183
+ if (this.closed)
246184
+ return;
246185
+ const options8 = { type: EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 };
246186
+ let stream = readdirp(root2, options8);
246187
+ this._streams.add(stream);
246188
+ stream.once(STR_CLOSE, () => {
246189
+ stream = undefined;
246190
+ });
246191
+ stream.once(STR_END, () => {
246192
+ if (stream) {
246193
+ this._streams.delete(stream);
246194
+ stream = undefined;
246195
+ }
246196
+ });
246197
+ return stream;
246198
+ }
246199
+ }
246200
+ function watch(paths, options8 = {}) {
246201
+ const watcher = new FSWatcher(options8);
246202
+ watcher.add(paths);
246203
+ return watcher;
246204
+ }
246205
+
246206
+ // src/cli/dev/dev-server/watcher.ts
246207
+ var import_debounce = __toESM(require_debounce(), 1);
246208
+ var WATCH_DEBOUNCE_MS = 300;
246209
+ var WATCH_QUEUE_DELAY_MS = 500;
246210
+
246211
+ class WatchBase44 {
246212
+ pathsToWatch;
246213
+ onChange;
246214
+ logger;
246215
+ watchers = [];
246216
+ queueWaitForCreation = [];
246217
+ queueWaitForCreationTimeout = null;
246218
+ constructor(pathsToWatch, onChange, logger) {
246219
+ this.pathsToWatch = pathsToWatch;
246220
+ this.onChange = onChange;
246221
+ this.logger = logger;
246222
+ }
246223
+ async start() {
246224
+ if (this.watchers.length > 0) {
246225
+ return;
246226
+ }
246227
+ for (const path19 of this.pathsToWatch) {
246228
+ if (await pathExists(path19)) {
246229
+ this.watchers.push(this.watchTarget(path19));
246230
+ } else {
246231
+ this.queueWaitForCreation.push(path19);
246232
+ }
246233
+ }
246234
+ this.watchCreationQueue();
246235
+ }
246236
+ async close() {
246237
+ if (this.queueWaitForCreationTimeout) {
246238
+ clearTimeout(this.queueWaitForCreationTimeout);
246239
+ this.queueWaitForCreationTimeout = null;
246240
+ }
246241
+ for (const watcher of this.watchers) {
246242
+ await watcher.close();
246243
+ }
246244
+ this.watchers = [];
246245
+ }
246246
+ getSubfolder(watchedPath) {
246247
+ return basename6(normalize2(watchedPath));
246248
+ }
246249
+ watchCreationQueue() {
246250
+ if (this.queueWaitForCreationTimeout) {
246251
+ clearTimeout(this.queueWaitForCreationTimeout);
246252
+ }
246253
+ this.queueWaitForCreationTimeout = setTimeout(async () => {
246254
+ for (const path19 of this.queueWaitForCreation) {
246255
+ if (await pathExists(path19)) {
246256
+ this.watchers.push(this.watchTarget(path19));
246257
+ this.queueWaitForCreation.splice(this.queueWaitForCreation.indexOf(path19), 1);
246258
+ }
246259
+ }
246260
+ if (this.queueWaitForCreation.length > 0) {
246261
+ this.watchCreationQueue();
246262
+ } else {
246263
+ this.queueWaitForCreationTimeout = null;
246264
+ }
246265
+ }, WATCH_QUEUE_DELAY_MS);
246266
+ }
246267
+ watchTarget(watchedPath) {
246268
+ const handler = import_debounce.default(async (_event, path19) => {
246269
+ const subfolder = this.getSubfolder(watchedPath);
246270
+ await this.onChange(subfolder, relative4(watchedPath, path19));
246271
+ }, WATCH_DEBOUNCE_MS);
246272
+ const watcher = watch(watchedPath, {
246273
+ ignoreInitial: true
246274
+ });
246275
+ watcher.on("all", handler);
246276
+ watcher.on("unlink", async () => {
246277
+ await watcher.close();
246278
+ this.watchers.splice(this.watchers.indexOf(watcher), 1);
246279
+ this.queueWaitForCreation.push(watchedPath);
246280
+ this.watchCreationQueue();
246281
+ });
246282
+ watcher.on("error", (err) => {
246283
+ this.logger.error(`[dev-server] Watch handler failed for ${watchedPath}`, err instanceof Error ? err : undefined);
246284
+ });
246285
+ return watcher;
246286
+ }
246287
+ }
246288
+
244234
246289
  // src/cli/dev/dev-server/main.ts
244235
246290
  var DEFAULT_PORT = 4400;
244236
246291
  var BASE44_APP_URL = "https://base44.app";
@@ -244238,7 +246293,7 @@ async function createDevServer(options8) {
244238
246293
  const { port: userPort } = options8;
244239
246294
  const port = userPort ?? await getPorts({ port: DEFAULT_PORT });
244240
246295
  const baseUrl = `http://localhost:${port}`;
244241
- const { functions, entities } = await options8.loadResources();
246296
+ const { functions, entities, project: project2 } = await options8.loadResources();
244242
246297
  const app = import_express4.default();
244243
246298
  const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
244244
246299
  target: BASE44_APP_URL,
@@ -244258,10 +246313,10 @@ async function createDevServer(options8) {
244258
246313
  });
244259
246314
  const devLogger = createDevLogger();
244260
246315
  const functionManager = new FunctionManager(functions, devLogger);
246316
+ const functionRoutes = createFunctionRouter(functionManager, devLogger);
246317
+ app.use("/api/apps/:appId/functions", functionRoutes);
244261
246318
  if (functionManager.getFunctionNames().length > 0) {
244262
246319
  R2.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
244263
- const functionRoutes = createFunctionRouter(functionManager, devLogger);
244264
- app.use("/api/apps/:appId/functions", functionRoutes);
244265
246320
  }
244266
246321
  const db2 = new Database(entities);
244267
246322
  if (db2.getCollectionNames().length > 0) {
@@ -244280,8 +246335,8 @@ async function createDevServer(options8) {
244280
246335
  devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
244281
246336
  remoteProxy(req, res, next);
244282
246337
  });
244283
- return new Promise((resolve6, reject) => {
244284
- const server = app.listen(port, "127.0.0.1", (err) => {
246338
+ const server = await new Promise((resolve8, reject) => {
246339
+ const s5 = app.listen(port, "127.0.0.1", (err) => {
244285
246340
  if (err) {
244286
246341
  if ("code" in err && err.code === "EADDRINUSE") {
244287
246342
  reject(new Error(`Port ${port} is already in use. Stop the other process and try again.`));
@@ -244289,24 +246344,37 @@ async function createDevServer(options8) {
244289
246344
  reject(err);
244290
246345
  }
244291
246346
  } else {
244292
- const io6 = createRealtimeServer(server);
244293
- emitEntityEvent = (appId, entityName, event) => {
244294
- broadcastEntityEvent(io6, appId, entityName, event);
244295
- };
244296
- const shutdown = () => {
244297
- io6.close();
244298
- functionManager.stopAll();
244299
- server.close();
244300
- };
244301
- process.on("SIGINT", shutdown);
244302
- process.on("SIGTERM", shutdown);
244303
- resolve6({
244304
- port,
244305
- server
244306
- });
246347
+ resolve8(s5);
244307
246348
  }
244308
246349
  });
244309
246350
  });
246351
+ const io6 = createRealtimeServer(server);
246352
+ emitEntityEvent = (appId, entityName, event) => {
246353
+ broadcastEntityEvent(io6, appId, entityName, event);
246354
+ };
246355
+ const base44ConfigWatcher = new WatchBase44([join18(dirname14(project2.configPath), project2.functionsDir)], async (subfolder) => {
246356
+ if (subfolder === "functions") {
246357
+ const { functions: functions2 } = await options8.loadResources();
246358
+ const previousFunctionCount = functionManager.getFunctionNames().length;
246359
+ functionManager.reload(functions2);
246360
+ const names = functionManager.getFunctionNames();
246361
+ if (names.length > 0) {
246362
+ devLogger.log(`Reloaded functions: ${names.sort().join(", ")}`);
246363
+ } else if (previousFunctionCount > 0) {
246364
+ devLogger.log("All functions removed");
246365
+ }
246366
+ }
246367
+ }, devLogger);
246368
+ await base44ConfigWatcher.start();
246369
+ const shutdown = () => {
246370
+ base44ConfigWatcher.close();
246371
+ io6.close();
246372
+ functionManager.stopAll();
246373
+ server.close();
246374
+ };
246375
+ process.on("SIGINT", shutdown);
246376
+ process.on("SIGTERM", shutdown);
246377
+ return { port, server };
244310
246378
  }
244311
246379
 
244312
246380
  // src/cli/commands/dev.ts
@@ -244330,8 +246398,8 @@ function getDevCommand(context) {
244330
246398
  }
244331
246399
 
244332
246400
  // src/cli/commands/project/eject.ts
244333
- import { resolve as resolve6 } from "node:path";
244334
- var import_lodash2 = __toESM(require_lodash(), 1);
246401
+ import { resolve as resolve8 } from "node:path";
246402
+ var import_kebabCase2 = __toESM(require_kebabCase(), 1);
244335
246403
  async function eject(options8) {
244336
246404
  const projects = await listProjects();
244337
246405
  const ejectableProjects = projects.filter((p4) => p4.isManagedSourceCode !== false);
@@ -244369,7 +246437,7 @@ async function eject(options8) {
244369
246437
  selectedProject = selected;
244370
246438
  }
244371
246439
  const projectId = selectedProject.id;
244372
- const suggestedPath = await isDirEmpty() ? `./` : `./${import_lodash2.default(selectedProject.name)}`;
246440
+ const suggestedPath = await isDirEmpty() ? `./` : `./${import_kebabCase2.default(selectedProject.name)}`;
244373
246441
  const selectedPath = options8.path ?? await Ze({
244374
246442
  message: "Where should we create your project?",
244375
246443
  placeholder: suggestedPath,
@@ -244379,7 +246447,7 @@ async function eject(options8) {
244379
246447
  Ne("Operation cancelled.");
244380
246448
  throw new CLIExitError(0);
244381
246449
  }
244382
- const resolvedPath = resolve6(selectedPath);
246450
+ const resolvedPath = resolve8(selectedPath);
244383
246451
  await runTask("Downloading your project's code...", async (updateMessage) => {
244384
246452
  await createProjectFilesForExistingProject({
244385
246453
  projectId,
@@ -244455,7 +246523,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
244455
246523
  import { release, type } from "node:os";
244456
246524
 
244457
246525
  // node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
244458
- import { dirname as dirname12, posix, sep } from "path";
246526
+ import { dirname as dirname15, posix, sep } from "path";
244459
246527
  function createModulerModifier() {
244460
246528
  const getModuleFromFileName = createGetModuleFromFilename();
244461
246529
  return async (frames) => {
@@ -244464,12 +246532,12 @@ function createModulerModifier() {
244464
246532
  return frames;
244465
246533
  };
244466
246534
  }
244467
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname12(process.argv[1]) : process.cwd(), isWindows4 = sep === "\\") {
244468
- const normalizedBase = isWindows4 ? normalizeWindowsPath2(basePath) : basePath;
246535
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname15(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246536
+ const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
244469
246537
  return (filename) => {
244470
246538
  if (!filename)
244471
246539
  return;
244472
- const normalizedFilename = isWindows4 ? normalizeWindowsPath2(filename) : filename;
246540
+ const normalizedFilename = isWindows5 ? normalizeWindowsPath2(filename) : filename;
244473
246541
  let { dir, base: file2, ext } = posix.parse(normalizedFilename);
244474
246542
  if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
244475
246543
  file2 = file2.slice(0, -1 * ext.length);
@@ -246742,14 +248810,14 @@ async function addSourceContext(frames) {
246742
248810
  return frames;
246743
248811
  }
246744
248812
  function getContextLinesFromFile(path19, ranges, output) {
246745
- return new Promise((resolve7) => {
248813
+ return new Promise((resolve9) => {
246746
248814
  const stream = createReadStream2(path19);
246747
248815
  const lineReaded = createInterface2({
246748
248816
  input: stream
246749
248817
  });
246750
248818
  function destroyStreamAndResolve() {
246751
248819
  stream.destroy();
246752
- resolve7();
248820
+ resolve9();
246753
248821
  }
246754
248822
  let lineNumber = 0;
246755
248823
  let currentRangeIndex = 0;
@@ -247861,15 +249929,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
247861
249929
  return true;
247862
249930
  if (this.featureFlagsPoller === undefined)
247863
249931
  return false;
247864
- return new Promise((resolve7) => {
249932
+ return new Promise((resolve9) => {
247865
249933
  const timeout3 = setTimeout(() => {
247866
249934
  cleanup();
247867
- resolve7(false);
249935
+ resolve9(false);
247868
249936
  }, timeoutMs);
247869
249937
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
247870
249938
  clearTimeout(timeout3);
247871
249939
  cleanup();
247872
- resolve7(count2 > 0);
249940
+ resolve9(count2 > 0);
247873
249941
  });
247874
249942
  });
247875
249943
  }
@@ -248682,4 +250750,4 @@ export {
248682
250750
  CLIExitError
248683
250751
  };
248684
250752
 
248685
- //# debugId=D9183A087214981864756E2164756E21
250753
+ //# debugId=CA7CF50A6F3C097064756E2164756E21