@base44-preview/cli 0.0.36-pr.353.f6be593 → 0.0.36-pr.355.6973e5e

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,34 +13211,58 @@ var require_cross_spawn = __commonJS((exports, module) => {
13211
13211
  module.exports._enoent = enoent;
13212
13212
  });
13213
13213
 
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();
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 ]/;
13242
13266
  var deburredLetters = {
13243
13267
  "À": "A",
13244
13268
  "Á": "A",
@@ -13429,256 +13453,72 @@ var require__deburrLetter = __commonJS((exports, module) => {
13429
13453
  "Œ": "Oe",
13430
13454
  "œ": "oe",
13431
13455
  "ʼn": "'n",
13432
- "ſ": "s"
13456
+ "ſ": "ss"
13433
13457
  };
13434
- var deburrLetter = basePropertyOf(deburredLetters);
13435
- module.exports = deburrLetter;
13436
- });
13437
-
13438
- // node_modules/lodash/_freeGlobal.js
13439
- var require__freeGlobal = __commonJS((exports, module) => {
13440
13458
  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();
13447
13459
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
13448
13460
  var root = freeGlobal || freeSelf || Function("return this")();
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);
13463
- while (++index < length) {
13464
- result[index] = iteratee(array2[index], index, array2);
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
13465
  }
13466
- return result;
13467
- }
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
- }
13466
+ while (++index < length) {
13467
+ accumulator = iteratee(accumulator, array2[index], index, array2);
13497
13468
  }
13498
- return result;
13469
+ return accumulator;
13499
13470
  }
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);
13471
+ function asciiWords(string4) {
13472
+ return string4.match(reAsciiWord) || [];
13509
13473
  }
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);
13474
+ function basePropertyOf(object2) {
13475
+ return function(key) {
13476
+ return object2 == null ? undefined : object2[key];
13477
+ };
13526
13478
  }
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";
13479
+ var deburrLetter = basePropertyOf(deburredLetters);
13480
+ function hasUnicodeWord(string4) {
13481
+ return reHasUnicodeWord.test(string4);
13534
13482
  }
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;
13483
+ function unicodeWords(string4) {
13484
+ return string4.match(reUnicodeWord) || [];
13545
13485
  }
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;
13486
+ var objectProto = Object.prototype;
13487
+ var objectToString3 = objectProto.toString;
13488
+ var Symbol2 = root.Symbol;
13556
13489
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined;
13557
13490
  var symbolToString = symbolProto ? symbolProto.toString : undefined;
13558
13491
  function baseToString(value) {
13559
13492
  if (typeof value == "string") {
13560
13493
  return value;
13561
13494
  }
13562
- if (isArray(value)) {
13563
- return arrayMap(value, baseToString) + "";
13564
- }
13565
13495
  if (isSymbol(value)) {
13566
13496
  return symbolToString ? symbolToString.call(value) : "";
13567
13497
  }
13568
13498
  var result = value + "";
13569
13499
  return result == "0" && 1 / value == -INFINITY ? "-0" : result;
13570
13500
  }
13571
- module.exports = baseToString;
13572
- });
13573
-
13574
- // node_modules/lodash/toString.js
13575
- var require_toString = __commonJS((exports, module) => {
13576
- var baseToString = require__baseToString();
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
+ }
13577
13512
  function toString2(value) {
13578
13513
  return value == null ? "" : baseToString(value);
13579
13514
  }
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");
13594
13515
  function deburr(string4) {
13595
13516
  string4 = toString2(string4);
13596
13517
  return string4 && string4.replace(reLatin, deburrLetter).replace(reComboMark, "");
13597
13518
  }
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();
13519
+ var kebabCase = createCompounder(function(result, word, index) {
13520
+ return result + (index ? "-" : "") + word.toLowerCase();
13521
+ });
13682
13522
  function words(string4, pattern, guard) {
13683
13523
  string4 = toString2(string4);
13684
13524
  pattern = guard ? undefined : pattern;
@@ -13687,30 +13527,6 @@ var require_words = __commonJS((exports, module) => {
13687
13527
  }
13688
13528
  return string4.match(pattern) || [];
13689
13529
  }
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
- });
13714
13530
  module.exports = kebabCase;
13715
13531
  });
13716
13532
 
@@ -14793,7 +14609,7 @@ var require_lib2 = __commonJS((exports) => {
14793
14609
  });
14794
14610
 
14795
14611
  // node_modules/lodash/lodash.js
14796
- var require_lodash = __commonJS((exports, module) => {
14612
+ var require_lodash2 = __commonJS((exports, module) => {
14797
14613
  (function() {
14798
14614
  var undefined2;
14799
14615
  var VERSION = "4.17.23";
@@ -127783,7 +127599,7 @@ var require_AST = __commonJS((exports) => {
127783
127599
  var require_JSONSchema = __commonJS((exports) => {
127784
127600
  Object.defineProperty(exports, "__esModule", { value: true });
127785
127601
  exports.isCompound = exports.isPrimitive = exports.isBoolean = exports.getRootSchema = exports.Intersection = exports.Types = exports.Parent = undefined;
127786
- var lodash_1 = require_lodash();
127602
+ var lodash_1 = require_lodash2();
127787
127603
  exports.Parent = Symbol("Parent");
127788
127604
  exports.Types = Symbol("Types");
127789
127605
  exports.Intersection = Symbol("Intersection");
@@ -130590,7 +130406,7 @@ var require_utils7 = __commonJS((exports) => {
130590
130406
  };
130591
130407
  Object.defineProperty(exports, "__esModule", { value: true });
130592
130408
  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;
130593
- var lodash_1 = require_lodash();
130409
+ var lodash_1 = require_lodash2();
130594
130410
  var path_1 = __require("path");
130595
130411
  var JSONSchema_1 = require_JSONSchema();
130596
130412
  var js_yaml_1 = __importDefault(require_js_yaml3());
@@ -130921,7 +130737,7 @@ ${values.join(`
130921
130737
  var require_generator = __commonJS((exports) => {
130922
130738
  Object.defineProperty(exports, "__esModule", { value: true });
130923
130739
  exports.generateType = exports.generate = undefined;
130924
- var lodash_1 = require_lodash();
130740
+ var lodash_1 = require_lodash2();
130925
130741
  var index_1 = require_src3();
130926
130742
  var AST_1 = require_AST();
130927
130743
  var utils_1 = require_utils7();
@@ -131184,7 +131000,7 @@ var require_generator = __commonJS((exports) => {
131184
131000
  var require_typesOfSchema = __commonJS((exports) => {
131185
131001
  Object.defineProperty(exports, "__esModule", { value: true });
131186
131002
  exports.typesOfSchema = undefined;
131187
- var lodash_1 = require_lodash();
131003
+ var lodash_1 = require_lodash2();
131188
131004
  var JSONSchema_1 = require_JSONSchema();
131189
131005
  function typesOfSchema(schema9) {
131190
131006
  if (schema9.tsType) {
@@ -131543,7 +131359,7 @@ var require_normalizer = __commonJS((exports) => {
131543
131359
  var require_optimizer = __commonJS((exports) => {
131544
131360
  Object.defineProperty(exports, "__esModule", { value: true });
131545
131361
  exports.optimize = undefined;
131546
- var lodash_1 = require_lodash();
131362
+ var lodash_1 = require_lodash2();
131547
131363
  var generator_1 = require_generator();
131548
131364
  var AST_1 = require_AST();
131549
131365
  var utils_1 = require_utils7();
@@ -131609,7 +131425,7 @@ var require_optimizer = __commonJS((exports) => {
131609
131425
  var require_parser = __commonJS((exports) => {
131610
131426
  Object.defineProperty(exports, "__esModule", { value: true });
131611
131427
  exports.parse = undefined;
131612
- var lodash_1 = require_lodash();
131428
+ var lodash_1 = require_lodash2();
131613
131429
  var util_1 = __require("util");
131614
131430
  var applySchemaTyping_1 = require_applySchemaTyping();
131615
131431
  var AST_1 = require_AST();
@@ -137462,7 +137278,7 @@ var require_linker = __commonJS((exports) => {
137462
137278
  Object.defineProperty(exports, "__esModule", { value: true });
137463
137279
  exports.link = undefined;
137464
137280
  var JSONSchema_1 = require_JSONSchema();
137465
- var lodash_1 = require_lodash();
137281
+ var lodash_1 = require_lodash2();
137466
137282
  function link2(schema9, parent = null) {
137467
137283
  if (!Array.isArray(schema9) && !(0, lodash_1.isPlainObject)(schema9)) {
137468
137284
  return schema9;
@@ -137530,7 +137346,7 @@ var require_src3 = __commonJS((exports) => {
137530
137346
  Object.defineProperty(exports, "__esModule", { value: true });
137531
137347
  exports.ValidationError = exports.compile = exports.compileFromFile = exports.DEFAULT_OPTIONS = undefined;
137532
137348
  var fs_1 = __require("fs");
137533
- var lodash_1 = require_lodash();
137349
+ var lodash_1 = require_lodash2();
137534
137350
  var path_1 = __require("path");
137535
137351
  var formatter_1 = require_formatter();
137536
137352
  var generator_1 = require_generator();
@@ -210402,168 +210218,6 @@ var require_multer = __commonJS((exports, module) => {
210402
210218
  module.exports.MulterError = MulterError;
210403
210219
  });
210404
210220
 
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
-
210567
210221
  // node_modules/@vercel/detect-agent/dist/index.js
210568
210222
  var require_dist5 = __commonJS((exports, module) => {
210569
210223
  var __defProp4 = Object.defineProperty;
@@ -210589,8 +210243,8 @@ var require_dist5 = __commonJS((exports, module) => {
210589
210243
  determineAgent: () => determineAgent
210590
210244
  });
210591
210245
  module.exports = __toCommonJS(src_exports);
210592
- var import_promises22 = __require("node:fs/promises");
210593
- var import_node_fs21 = __require("node:fs");
210246
+ var import_promises19 = __require("node:fs/promises");
210247
+ var import_node_fs19 = __require("node:fs");
210594
210248
  var DEVIN_LOCAL_PATH = "/opt/.devin";
210595
210249
  var CURSOR2 = "cursor";
210596
210250
  var CURSOR_CLI = "cursor-cli";
@@ -210647,7 +210301,7 @@ var require_dist5 = __commonJS((exports, module) => {
210647
210301
  return { isAgent: true, agent: { name: REPLIT } };
210648
210302
  }
210649
210303
  try {
210650
- await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs21.constants.F_OK);
210304
+ await (0, import_promises19.access)(DEVIN_LOCAL_PATH, import_node_fs19.constants.F_OK);
210651
210305
  return { isAgent: true, agent: { name: DEVIN } };
210652
210306
  } catch (error48) {}
210653
210307
  return { isAgent: false, agent: undefined };
@@ -226244,14 +225898,20 @@ function getTestOverrides() {
226244
225898
  // src/core/clients/schemas.ts
226245
225899
  var ApiErrorResponseSchema = exports_external.object({
226246
225900
  error_type: exports_external.string().optional(),
226247
- message: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
225901
+ message: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).nullable().optional(),
226248
225902
  detail: exports_external.union([
226249
225903
  exports_external.string(),
226250
225904
  exports_external.record(exports_external.string(), exports_external.unknown()),
226251
225905
  exports_external.array(exports_external.unknown())
226252
225906
  ]).nullable().optional(),
226253
225907
  traceback: exports_external.string().nullable().optional(),
226254
- extra_data: exports_external.record(exports_external.string(), exports_external.unknown()).optional().nullable()
225908
+ extra_data: exports_external.looseObject({
225909
+ reason: exports_external.string().optional(),
225910
+ errors: exports_external.array(exports_external.union([
225911
+ exports_external.object({ name: exports_external.string(), message: exports_external.string() }),
225912
+ exports_external.string()
225913
+ ])).optional()
225914
+ }).optional().nullable()
226255
225915
  });
226256
225916
 
226257
225917
  // src/core/errors.ts
@@ -226272,14 +225932,22 @@ function formatApiError(errorBody) {
226272
225932
  }
226273
225933
  return JSON.stringify(errorBody, null, 2);
226274
225934
  }
225935
+ function parseErrorDetails(extraData) {
225936
+ const errors3 = extraData?.errors;
225937
+ if (!errors3 || errors3.length === 0)
225938
+ return;
225939
+ return errors3.map((item) => typeof item === "string" ? item : item.name ? `${item.name}: ${item.message}` : item.message);
225940
+ }
226275
225941
 
226276
225942
  class CLIError extends Error {
226277
225943
  hints;
225944
+ details;
226278
225945
  cause;
226279
225946
  constructor(message, options) {
226280
225947
  super(message);
226281
225948
  this.name = this.constructor.name;
226282
225949
  this.hints = options?.hints ?? [];
225950
+ this.details = options?.details ?? [];
226283
225951
  this.cause = options?.cause;
226284
225952
  Error.captureStackTrace(this, this.constructor);
226285
225953
  }
@@ -226371,9 +226039,9 @@ class ApiError extends SystemError {
226371
226039
  requestBody;
226372
226040
  responseBody;
226373
226041
  requestId;
226374
- constructor(message, options, parsedResponse) {
226375
- const hints = options?.hints ?? ApiError.getReasonHints(parsedResponse) ?? ApiError.getDefaultHints(options?.statusCode);
226376
- super(message, { hints, cause: options?.cause });
226042
+ constructor(message, options) {
226043
+ const hints = options?.hints ?? ApiError.getDefaultHints(options?.statusCode);
226044
+ super(message, { hints, details: options?.details, cause: options?.cause });
226377
226045
  this.statusCode = options?.statusCode;
226378
226046
  this.requestUrl = options?.requestUrl;
226379
226047
  this.requestMethod = options?.requestMethod;
@@ -226385,13 +226053,15 @@ class ApiError extends SystemError {
226385
226053
  if (error48 instanceof HTTPError) {
226386
226054
  let message;
226387
226055
  let responseBody;
226388
- let parsedErrorResponse;
226056
+ let hints;
226057
+ let details;
226389
226058
  try {
226390
226059
  responseBody = await error48.response.clone().json();
226391
226060
  message = formatApiError(responseBody);
226392
226061
  const parsed = ApiErrorResponseSchema.safeParse(responseBody);
226393
226062
  if (parsed.success) {
226394
- parsedErrorResponse = parsed.data;
226063
+ hints = ApiError.getReasonHints(parsed.data);
226064
+ details = parseErrorDetails(parsed.data.extra_data);
226395
226065
  }
226396
226066
  } catch {
226397
226067
  message = error48.message;
@@ -226406,8 +226076,10 @@ class ApiError extends SystemError {
226406
226076
  requestBody,
226407
226077
  responseBody,
226408
226078
  requestId,
226079
+ hints,
226080
+ details,
226409
226081
  cause: error48
226410
- }, parsedErrorResponse);
226082
+ });
226411
226083
  }
226412
226084
  if (error48 instanceof Error) {
226413
226085
  return new ApiError(`Error ${context}: ${error48.message}`, {
@@ -226433,6 +226105,13 @@ class ApiError extends SystemError {
226433
226105
  if (statusCode === 404) {
226434
226106
  return [{ message: "The requested resource was not found" }];
226435
226107
  }
226108
+ if (statusCode === 422) {
226109
+ return [
226110
+ {
226111
+ message: "The request was rejected due to a validation error. Check the error message above for details."
226112
+ }
226113
+ ];
226114
+ }
226436
226115
  if (statusCode === 428) {
226437
226116
  return [
226438
226117
  {
@@ -233981,7 +233660,9 @@ async function readFunction(configPath) {
233981
233660
  const functionDir = dirname4(configPath);
233982
233661
  const entryPath = join5(functionDir, config5.entry);
233983
233662
  if (!await pathExists(entryPath)) {
233984
- throw new FileNotFoundError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`);
233663
+ throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
233664
+ hints: [{ message: "Check the 'entry' field in your function config" }]
233665
+ });
233985
233666
  }
233986
233667
  const filePaths = await globby("*.{js,ts,json}", {
233987
233668
  cwd: functionDir,
@@ -234300,7 +233981,7 @@ import { tmpdir } from "node:os";
234300
233981
  import { join as join8 } from "node:path";
234301
233982
  async function deploySite(siteOutputDir) {
234302
233983
  if (!await pathExists(siteOutputDir)) {
234303
- throw new FileNotFoundError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
233984
+ throw new InvalidInputError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
234304
233985
  hints: [
234305
233986
  { message: "Run your build command (e.g., 'npm run build') first" }
234306
233987
  ]
@@ -235090,6 +234771,10 @@ var theme = {
235090
234771
  ].filter(Boolean);
235091
234772
  return source_default.dim(parts.join(" | "));
235092
234773
  },
234774
+ details(lines) {
234775
+ return lines.map((line) => ` • ${line}`).join(`
234776
+ `);
234777
+ },
235093
234778
  agentHints(hints) {
235094
234779
  if (hints.length === 0) {
235095
234780
  return null;
@@ -241907,12 +241592,11 @@ var package_default = {
241907
241592
  "@types/ejs": "^3.1.5",
241908
241593
  "@types/express": "^5.0.6",
241909
241594
  "@types/json-schema": "^7.0.15",
241910
- "@types/lodash": "^4.17.24",
241911
- "@types/multer": "^2.0.0",
241595
+ "@types/lodash.kebabcase": "^4.1.9",
241912
241596
  "@types/node": "^22.10.5",
241597
+ "@types/multer": "^2.0.0",
241913
241598
  "@vercel/detect-agent": "^1.1.0",
241914
241599
  chalk: "^5.6.2",
241915
- chokidar: "^5.0.0",
241916
241600
  commander: "^12.1.0",
241917
241601
  "common-tags": "^1.8.2",
241918
241602
  cors: "^2.8.5",
@@ -241928,9 +241612,9 @@ var package_default = {
241928
241612
  json5: "^2.2.3",
241929
241613
  knip: "^5.83.1",
241930
241614
  ky: "^1.14.2",
241931
- lodash: "^4.17.23",
241932
- msw: "^2.12.10",
241615
+ "lodash.kebabcase": "^4.1.1",
241933
241616
  multer: "^2.0.0",
241617
+ msw: "^2.12.10",
241934
241618
  nanoid: "^5.1.6",
241935
241619
  open: "^11.0.0",
241936
241620
  "p-wait-for": "^6.0.0",
@@ -242026,22 +241710,28 @@ async function runCommand(commandFn, options, context) {
242026
241710
  process.stdout.write(result.stdout);
242027
241711
  }
242028
241712
  } catch (error48) {
242029
- const errorMessage = error48 instanceof Error ? error48.message : String(error48);
242030
- R2.error(errorMessage);
242031
- if (process.env.DEBUG === "1" && error48 instanceof Error && error48.stack) {
242032
- R2.error(theme.styles.dim(error48.stack));
242033
- }
242034
- if (isCLIError(error48)) {
242035
- const hints = theme.format.agentHints(error48.hints);
242036
- if (hints) {
242037
- R2.error(hints);
242038
- }
242039
- }
241713
+ displayError(error48);
242040
241714
  const errorContext = context.errorReporter.getErrorContext();
242041
241715
  Le(theme.format.errorContext(errorContext));
242042
241716
  throw error48;
242043
241717
  }
242044
241718
  }
241719
+ function displayError(error48) {
241720
+ const errorMessage = error48 instanceof Error ? error48.message : String(error48);
241721
+ R2.error(errorMessage);
241722
+ if (isCLIError(error48)) {
241723
+ if (error48.details.length > 0) {
241724
+ R2.error(theme.format.details(error48.details));
241725
+ }
241726
+ const hints = theme.format.agentHints(error48.hints);
241727
+ if (hints) {
241728
+ R2.error(hints);
241729
+ }
241730
+ }
241731
+ if (process.env.DEBUG === "1" && error48 instanceof Error && error48.stack) {
241732
+ R2.error(theme.styles.dim(error48.stack));
241733
+ }
241734
+ }
242045
241735
  // src/cli/utils/runTask.ts
242046
241736
  async function runTask(startMessage, operation, options) {
242047
241737
  const s = bt2();
@@ -243033,10 +242723,8 @@ async function deployFunctionsAction() {
243033
242723
  R2.warn(`Deleted: ${result.deleted.join(", ")}`);
243034
242724
  }
243035
242725
  if (result.errors && result.errors.length > 0) {
243036
- const errorMessages = result.errors.map((e2) => `'${e2.name}' function: ${e2.message}`).join(`
243037
- `);
243038
- throw new ApiError(`Function deployment errors:
243039
- ${errorMessages}`, {
242726
+ throw new ApiError("Function deployment errors", {
242727
+ details: result.errors.map((e2) => `'${e2.name}': ${e2.message}`),
243040
242728
  hints: [
243041
242729
  { message: "Check the function code for syntax errors" },
243042
242730
  { message: "Ensure all imports are valid" }
@@ -243053,7 +242741,7 @@ function getFunctionsDeployCommand(context) {
243053
242741
 
243054
242742
  // src/cli/commands/project/create.ts
243055
242743
  import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
243056
- var import_kebabCase = __toESM(require_kebabCase(), 1);
242744
+ var import_lodash = __toESM(require_lodash(), 1);
243057
242745
  var DEFAULT_TEMPLATE_ID = "backend-only";
243058
242746
  async function getTemplateById(templateId) {
243059
242747
  const templates = await listTemplates();
@@ -243097,7 +242785,7 @@ async function createInteractive(options) {
243097
242785
  });
243098
242786
  },
243099
242787
  projectPath: async ({ results }) => {
243100
- const suggestedPath = await isDirEmpty() ? "./" : `./${import_kebabCase.default(results.name)}`;
242788
+ const suggestedPath = await isDirEmpty() ? "./" : `./${import_lodash.default(results.name)}`;
243101
242789
  return Ze({
243102
242790
  message: "Where should we create your project?",
243103
242791
  placeholder: suggestedPath,
@@ -243860,7 +243548,6 @@ function getTypesCommand(context) {
243860
243548
  }
243861
243549
 
243862
243550
  // src/cli/dev/dev-server/main.ts
243863
- import { dirname as dirname14, join as join18 } from "node:path";
243864
243551
  var import_cors = __toESM(require_lib4(), 1);
243865
243552
  var import_express4 = __toESM(require_express(), 1);
243866
243553
 
@@ -244068,10 +243755,6 @@ class FunctionManager {
244068
243755
  try {
244069
243756
  return await promise2;
244070
243757
  } finally {
244071
- if (!this.starting.has(name2) && this.running.has(name2)) {
244072
- this.running.get(name2)?.process.kill();
244073
- this.running.delete(name2);
244074
- }
244075
243758
  this.starting.delete(name2);
244076
243759
  }
244077
243760
  }
@@ -244087,10 +243770,6 @@ class FunctionManager {
244087
243770
  this.setupProcessHandlers(name2, process21);
244088
243771
  return this.waitForReady(name2, runningFunc);
244089
243772
  }
244090
- reload(functions) {
244091
- this.stopAll();
244092
- this.functions = new Map(functions.map((f7) => [f7.name, f7]));
244093
- }
244094
243773
  stopAll() {
244095
243774
  for (const [name2, { process: process21 }] of this.running) {
244096
243775
  this.logger.log(`[dev-server] Stopping function: ${name2}`);
@@ -244132,9 +243811,7 @@ class FunctionManager {
244132
243811
  }
244133
243812
  });
244134
243813
  process21.on("exit", (code2) => {
244135
- if (code2 !== null) {
244136
- this.logger.log(`[dev-server] Function "${name2}" exited with code ${code2}`);
244137
- }
243814
+ this.logger.log(`[dev-server] Function "${name2}" exited with code ${code2}`);
244138
243815
  this.running.delete(name2);
244139
243816
  });
244140
243817
  process21.on("error", (error48) => {
@@ -244589,1708 +244266,6 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
244589
244266
  return router;
244590
244267
  }
244591
244268
 
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 || this.queueWaitForCreation.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
- const toRemove = [];
246255
- for (const path19 of this.queueWaitForCreation) {
246256
- if (await pathExists(path19)) {
246257
- this.watchers.push(this.watchTarget(path19));
246258
- toRemove.push(path19);
246259
- }
246260
- }
246261
- this.queueWaitForCreation = this.queueWaitForCreation.filter((p4) => !toRemove.includes(p4));
246262
- if (this.queueWaitForCreation.length > 0) {
246263
- this.watchCreationQueue();
246264
- } else {
246265
- this.queueWaitForCreationTimeout = null;
246266
- }
246267
- }, WATCH_QUEUE_DELAY_MS);
246268
- }
246269
- watchTarget(watchedPath) {
246270
- const handler = import_debounce.default(async (_event, path19) => {
246271
- const subfolder = this.getSubfolder(watchedPath);
246272
- await this.onChange(subfolder, relative4(watchedPath, path19));
246273
- }, WATCH_DEBOUNCE_MS);
246274
- const watcher = watch(watchedPath, {
246275
- ignoreInitial: true
246276
- });
246277
- watcher.on("all", handler);
246278
- watcher.on("unlinkDir", async (deletedPath) => {
246279
- if (deletedPath !== watchedPath) {
246280
- return;
246281
- }
246282
- await watcher.close();
246283
- this.watchers.splice(this.watchers.indexOf(watcher), 1);
246284
- this.queueWaitForCreation.push(watchedPath);
246285
- this.watchCreationQueue();
246286
- });
246287
- watcher.on("error", (err) => {
246288
- this.logger.error(`[dev-server] Watch handler failed for ${watchedPath}`, err instanceof Error ? err : undefined);
246289
- });
246290
- return watcher;
246291
- }
246292
- }
246293
-
246294
244269
  // src/cli/dev/dev-server/main.ts
246295
244270
  var DEFAULT_PORT = 4400;
246296
244271
  var BASE44_APP_URL = "https://base44.app";
@@ -246298,7 +244273,7 @@ async function createDevServer(options8) {
246298
244273
  const { port: userPort } = options8;
246299
244274
  const port = userPort ?? await getPorts({ port: DEFAULT_PORT });
246300
244275
  const baseUrl = `http://localhost:${port}`;
246301
- const { functions, entities, project: project2 } = await options8.loadResources();
244276
+ const { functions, entities } = await options8.loadResources();
246302
244277
  const app = import_express4.default();
246303
244278
  const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
246304
244279
  target: BASE44_APP_URL,
@@ -246318,10 +244293,10 @@ async function createDevServer(options8) {
246318
244293
  });
246319
244294
  const devLogger = createDevLogger();
246320
244295
  const functionManager = new FunctionManager(functions, devLogger);
246321
- const functionRoutes = createFunctionRouter(functionManager, devLogger);
246322
- app.use("/api/apps/:appId/functions", functionRoutes);
246323
244296
  if (functionManager.getFunctionNames().length > 0) {
246324
244297
  R2.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
244298
+ const functionRoutes = createFunctionRouter(functionManager, devLogger);
244299
+ app.use("/api/apps/:appId/functions", functionRoutes);
246325
244300
  }
246326
244301
  const db2 = new Database(entities);
246327
244302
  if (db2.getCollectionNames().length > 0) {
@@ -246340,8 +244315,8 @@ async function createDevServer(options8) {
246340
244315
  devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
246341
244316
  remoteProxy(req, res, next);
246342
244317
  });
246343
- const server = await new Promise((resolve8, reject) => {
246344
- const s5 = app.listen(port, "127.0.0.1", (err) => {
244318
+ return new Promise((resolve6, reject) => {
244319
+ const server = app.listen(port, "127.0.0.1", (err) => {
246345
244320
  if (err) {
246346
244321
  if ("code" in err && err.code === "EADDRINUSE") {
246347
244322
  reject(new Error(`Port ${port} is already in use. Stop the other process and try again.`));
@@ -246349,37 +244324,24 @@ async function createDevServer(options8) {
246349
244324
  reject(err);
246350
244325
  }
246351
244326
  } else {
246352
- resolve8(s5);
244327
+ const io6 = createRealtimeServer(server);
244328
+ emitEntityEvent = (appId, entityName, event) => {
244329
+ broadcastEntityEvent(io6, appId, entityName, event);
244330
+ };
244331
+ const shutdown = () => {
244332
+ io6.close();
244333
+ functionManager.stopAll();
244334
+ server.close();
244335
+ };
244336
+ process.on("SIGINT", shutdown);
244337
+ process.on("SIGTERM", shutdown);
244338
+ resolve6({
244339
+ port,
244340
+ server
244341
+ });
246353
244342
  }
246354
244343
  });
246355
244344
  });
246356
- const io6 = createRealtimeServer(server);
246357
- emitEntityEvent = (appId, entityName, event) => {
246358
- broadcastEntityEvent(io6, appId, entityName, event);
246359
- };
246360
- const base44ConfigWatcher = new WatchBase44([join18(dirname14(project2.configPath), project2.functionsDir)], async (subfolder) => {
246361
- if (subfolder === "functions") {
246362
- const { functions: functions2 } = await options8.loadResources();
246363
- const previousFunctionCount = functionManager.getFunctionNames().length;
246364
- functionManager.reload(functions2);
246365
- const names = functionManager.getFunctionNames();
246366
- if (names.length > 0) {
246367
- devLogger.log(`Reloaded functions: ${names.sort().join(", ")}`);
246368
- } else if (previousFunctionCount > 0) {
246369
- devLogger.log("All functions removed");
246370
- }
246371
- }
246372
- }, devLogger);
246373
- await base44ConfigWatcher.start();
246374
- const shutdown = () => {
246375
- base44ConfigWatcher.close();
246376
- io6.close();
246377
- functionManager.stopAll();
246378
- server.close();
246379
- };
246380
- process.on("SIGINT", shutdown);
246381
- process.on("SIGTERM", shutdown);
246382
- return { port, server };
246383
244345
  }
246384
244346
 
246385
244347
  // src/cli/commands/dev.ts
@@ -246403,8 +244365,8 @@ function getDevCommand(context) {
246403
244365
  }
246404
244366
 
246405
244367
  // src/cli/commands/project/eject.ts
246406
- import { resolve as resolve8 } from "node:path";
246407
- var import_kebabCase2 = __toESM(require_kebabCase(), 1);
244368
+ import { resolve as resolve6 } from "node:path";
244369
+ var import_lodash2 = __toESM(require_lodash(), 1);
246408
244370
  async function eject(options8) {
246409
244371
  const projects = await listProjects();
246410
244372
  const ejectableProjects = projects.filter((p4) => p4.isManagedSourceCode !== false);
@@ -246442,7 +244404,7 @@ async function eject(options8) {
246442
244404
  selectedProject = selected;
246443
244405
  }
246444
244406
  const projectId = selectedProject.id;
246445
- const suggestedPath = await isDirEmpty() ? `./` : `./${import_kebabCase2.default(selectedProject.name)}`;
244407
+ const suggestedPath = await isDirEmpty() ? `./` : `./${import_lodash2.default(selectedProject.name)}`;
246446
244408
  const selectedPath = options8.path ?? await Ze({
246447
244409
  message: "Where should we create your project?",
246448
244410
  placeholder: suggestedPath,
@@ -246452,7 +244414,7 @@ async function eject(options8) {
246452
244414
  Ne("Operation cancelled.");
246453
244415
  throw new CLIExitError(0);
246454
244416
  }
246455
- const resolvedPath = resolve8(selectedPath);
244417
+ const resolvedPath = resolve6(selectedPath);
246456
244418
  await runTask("Downloading your project's code...", async (updateMessage) => {
246457
244419
  await createProjectFilesForExistingProject({
246458
244420
  projectId,
@@ -246528,7 +244490,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
246528
244490
  import { release, type } from "node:os";
246529
244491
 
246530
244492
  // node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
246531
- import { dirname as dirname15, posix, sep } from "path";
244493
+ import { dirname as dirname12, posix, sep } from "path";
246532
244494
  function createModulerModifier() {
246533
244495
  const getModuleFromFileName = createGetModuleFromFilename();
246534
244496
  return async (frames) => {
@@ -246537,12 +244499,12 @@ function createModulerModifier() {
246537
244499
  return frames;
246538
244500
  };
246539
244501
  }
246540
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname15(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246541
- const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
244502
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname12(process.argv[1]) : process.cwd(), isWindows4 = sep === "\\") {
244503
+ const normalizedBase = isWindows4 ? normalizeWindowsPath2(basePath) : basePath;
246542
244504
  return (filename) => {
246543
244505
  if (!filename)
246544
244506
  return;
246545
- const normalizedFilename = isWindows5 ? normalizeWindowsPath2(filename) : filename;
244507
+ const normalizedFilename = isWindows4 ? normalizeWindowsPath2(filename) : filename;
246546
244508
  let { dir, base: file2, ext } = posix.parse(normalizedFilename);
246547
244509
  if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
246548
244510
  file2 = file2.slice(0, -1 * ext.length);
@@ -248815,14 +246777,14 @@ async function addSourceContext(frames) {
248815
246777
  return frames;
248816
246778
  }
248817
246779
  function getContextLinesFromFile(path19, ranges, output) {
248818
- return new Promise((resolve9) => {
246780
+ return new Promise((resolve7) => {
248819
246781
  const stream = createReadStream2(path19);
248820
246782
  const lineReaded = createInterface2({
248821
246783
  input: stream
248822
246784
  });
248823
246785
  function destroyStreamAndResolve() {
248824
246786
  stream.destroy();
248825
- resolve9();
246787
+ resolve7();
248826
246788
  }
248827
246789
  let lineNumber = 0;
248828
246790
  let currentRangeIndex = 0;
@@ -249934,15 +247896,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
249934
247896
  return true;
249935
247897
  if (this.featureFlagsPoller === undefined)
249936
247898
  return false;
249937
- return new Promise((resolve9) => {
247899
+ return new Promise((resolve7) => {
249938
247900
  const timeout3 = setTimeout(() => {
249939
247901
  cleanup();
249940
- resolve9(false);
247902
+ resolve7(false);
249941
247903
  }, timeoutMs);
249942
247904
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
249943
247905
  clearTimeout(timeout3);
249944
247906
  cleanup();
249945
- resolve9(count2 > 0);
247907
+ resolve7(count2 > 0);
249946
247908
  });
249947
247909
  });
249948
247910
  }
@@ -250755,4 +248717,4 @@ export {
250755
248717
  CLIExitError
250756
248718
  };
250757
248719
 
250758
- //# debugId=956EF781426686AC64756E2164756E21
248720
+ //# debugId=8F6EC7A541FD9CD264756E2164756E21