@base44-preview/cli 0.0.36-pr.356.36d8c62 → 0.0.37-pr.246.9589e51
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 +2291 -179
- package/dist/cli/index.js.map +42 -11
- package/package.json +4 -3
package/dist/cli/index.js
CHANGED
|
@@ -8933,10 +8933,10 @@ var require_ejs = __commonJS((exports) => {
|
|
|
8933
8933
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
8934
8934
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
8935
8935
|
exports.resolveInclude = function(name2, filename, isDir) {
|
|
8936
|
-
var
|
|
8936
|
+
var dirname7 = path11.dirname;
|
|
8937
8937
|
var extname = path11.extname;
|
|
8938
8938
|
var resolve = path11.resolve;
|
|
8939
|
-
var includePath = resolve(isDir ? filename :
|
|
8939
|
+
var includePath = resolve(isDir ? filename : dirname7(filename), name2);
|
|
8940
8940
|
var ext = extname(name2);
|
|
8941
8941
|
if (!ext) {
|
|
8942
8942
|
includePath += ".ejs";
|
|
@@ -12652,8 +12652,8 @@ var require_main = __commonJS((exports, module) => {
|
|
|
12652
12652
|
const shortPaths = [];
|
|
12653
12653
|
for (const filePath of optionPaths) {
|
|
12654
12654
|
try {
|
|
12655
|
-
const
|
|
12656
|
-
shortPaths.push(
|
|
12655
|
+
const relative3 = path11.relative(process.cwd(), filePath);
|
|
12656
|
+
shortPaths.push(relative3);
|
|
12657
12657
|
} catch (e2) {
|
|
12658
12658
|
if (debug) {
|
|
12659
12659
|
_debug(`Failed to load ${filePath} ${e2.message}`);
|
|
@@ -13211,58 +13211,34 @@ var require_cross_spawn = __commonJS((exports, module) => {
|
|
|
13211
13211
|
module.exports._enoent = enoent;
|
|
13212
13212
|
});
|
|
13213
13213
|
|
|
13214
|
-
// node_modules/lodash
|
|
13215
|
-
var
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
var
|
|
13242
|
-
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
13243
|
-
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
13244
|
-
var rsUpper = "[" + rsUpperRange + "]";
|
|
13245
|
-
var rsZWJ = "\\u200d";
|
|
13246
|
-
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
13247
|
-
var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
13248
|
-
var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
13249
|
-
var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
13250
|
-
var reOptMod = rsModifier + "?";
|
|
13251
|
-
var rsOptVar = "[" + rsVarRange + "]?";
|
|
13252
|
-
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
13253
|
-
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
13254
|
-
var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq;
|
|
13255
|
-
var reApos = RegExp(rsApos, "g");
|
|
13256
|
-
var reComboMark = RegExp(rsCombo, "g");
|
|
13257
|
-
var reUnicodeWord = RegExp([
|
|
13258
|
-
rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
|
13259
|
-
rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [rsBreak, rsUpper + rsLowerMisc, "$"].join("|") + ")",
|
|
13260
|
-
rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr,
|
|
13261
|
-
rsUpper + "+" + rsOptUpperContr,
|
|
13262
|
-
rsDigits,
|
|
13263
|
-
rsEmoji
|
|
13264
|
-
].join("|"), "g");
|
|
13265
|
-
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
13214
|
+
// node_modules/lodash/_arrayReduce.js
|
|
13215
|
+
var require__arrayReduce = __commonJS((exports, module) => {
|
|
13216
|
+
function arrayReduce(array2, iteratee, accumulator, initAccum) {
|
|
13217
|
+
var index = -1, length = array2 == null ? 0 : array2.length;
|
|
13218
|
+
if (initAccum && length) {
|
|
13219
|
+
accumulator = array2[++index];
|
|
13220
|
+
}
|
|
13221
|
+
while (++index < length) {
|
|
13222
|
+
accumulator = iteratee(accumulator, array2[index], index, array2);
|
|
13223
|
+
}
|
|
13224
|
+
return accumulator;
|
|
13225
|
+
}
|
|
13226
|
+
module.exports = arrayReduce;
|
|
13227
|
+
});
|
|
13228
|
+
|
|
13229
|
+
// node_modules/lodash/_basePropertyOf.js
|
|
13230
|
+
var require__basePropertyOf = __commonJS((exports, module) => {
|
|
13231
|
+
function basePropertyOf(object2) {
|
|
13232
|
+
return function(key) {
|
|
13233
|
+
return object2 == null ? undefined : object2[key];
|
|
13234
|
+
};
|
|
13235
|
+
}
|
|
13236
|
+
module.exports = basePropertyOf;
|
|
13237
|
+
});
|
|
13238
|
+
|
|
13239
|
+
// node_modules/lodash/_deburrLetter.js
|
|
13240
|
+
var require__deburrLetter = __commonJS((exports, module) => {
|
|
13241
|
+
var basePropertyOf = require__basePropertyOf();
|
|
13266
13242
|
var deburredLetters = {
|
|
13267
13243
|
"À": "A",
|
|
13268
13244
|
"Á": "A",
|
|
@@ -13453,72 +13429,256 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
13453
13429
|
"Œ": "Oe",
|
|
13454
13430
|
"œ": "oe",
|
|
13455
13431
|
"ʼn": "'n",
|
|
13456
|
-
"ſ": "
|
|
13432
|
+
"ſ": "s"
|
|
13457
13433
|
};
|
|
13434
|
+
var deburrLetter = basePropertyOf(deburredLetters);
|
|
13435
|
+
module.exports = deburrLetter;
|
|
13436
|
+
});
|
|
13437
|
+
|
|
13438
|
+
// node_modules/lodash/_freeGlobal.js
|
|
13439
|
+
var require__freeGlobal = __commonJS((exports, module) => {
|
|
13458
13440
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
13441
|
+
module.exports = freeGlobal;
|
|
13442
|
+
});
|
|
13443
|
+
|
|
13444
|
+
// node_modules/lodash/_root.js
|
|
13445
|
+
var require__root = __commonJS((exports, module) => {
|
|
13446
|
+
var freeGlobal = require__freeGlobal();
|
|
13459
13447
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
13460
13448
|
var root = freeGlobal || freeSelf || Function("return this")();
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13449
|
+
module.exports = root;
|
|
13450
|
+
});
|
|
13451
|
+
|
|
13452
|
+
// node_modules/lodash/_Symbol.js
|
|
13453
|
+
var require__Symbol = __commonJS((exports, module) => {
|
|
13454
|
+
var root = require__root();
|
|
13455
|
+
var Symbol2 = root.Symbol;
|
|
13456
|
+
module.exports = Symbol2;
|
|
13457
|
+
});
|
|
13458
|
+
|
|
13459
|
+
// node_modules/lodash/_arrayMap.js
|
|
13460
|
+
var require__arrayMap = __commonJS((exports, module) => {
|
|
13461
|
+
function arrayMap(array2, iteratee) {
|
|
13462
|
+
var index = -1, length = array2 == null ? 0 : array2.length, result = Array(length);
|
|
13466
13463
|
while (++index < length) {
|
|
13467
|
-
|
|
13464
|
+
result[index] = iteratee(array2[index], index, array2);
|
|
13468
13465
|
}
|
|
13469
|
-
return
|
|
13466
|
+
return result;
|
|
13470
13467
|
}
|
|
13471
|
-
|
|
13472
|
-
|
|
13468
|
+
module.exports = arrayMap;
|
|
13469
|
+
});
|
|
13470
|
+
|
|
13471
|
+
// node_modules/lodash/isArray.js
|
|
13472
|
+
var require_isArray = __commonJS((exports, module) => {
|
|
13473
|
+
var isArray = Array.isArray;
|
|
13474
|
+
module.exports = isArray;
|
|
13475
|
+
});
|
|
13476
|
+
|
|
13477
|
+
// node_modules/lodash/_getRawTag.js
|
|
13478
|
+
var require__getRawTag = __commonJS((exports, module) => {
|
|
13479
|
+
var Symbol2 = require__Symbol();
|
|
13480
|
+
var objectProto = Object.prototype;
|
|
13481
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
13482
|
+
var nativeObjectToString = objectProto.toString;
|
|
13483
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
|
|
13484
|
+
function getRawTag(value) {
|
|
13485
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
13486
|
+
try {
|
|
13487
|
+
value[symToStringTag] = undefined;
|
|
13488
|
+
var unmasked = true;
|
|
13489
|
+
} catch (e2) {}
|
|
13490
|
+
var result = nativeObjectToString.call(value);
|
|
13491
|
+
if (unmasked) {
|
|
13492
|
+
if (isOwn) {
|
|
13493
|
+
value[symToStringTag] = tag;
|
|
13494
|
+
} else {
|
|
13495
|
+
delete value[symToStringTag];
|
|
13496
|
+
}
|
|
13497
|
+
}
|
|
13498
|
+
return result;
|
|
13473
13499
|
}
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13500
|
+
module.exports = getRawTag;
|
|
13501
|
+
});
|
|
13502
|
+
|
|
13503
|
+
// node_modules/lodash/_objectToString.js
|
|
13504
|
+
var require__objectToString = __commonJS((exports, module) => {
|
|
13505
|
+
var objectProto = Object.prototype;
|
|
13506
|
+
var nativeObjectToString = objectProto.toString;
|
|
13507
|
+
function objectToString3(value) {
|
|
13508
|
+
return nativeObjectToString.call(value);
|
|
13478
13509
|
}
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13510
|
+
module.exports = objectToString3;
|
|
13511
|
+
});
|
|
13512
|
+
|
|
13513
|
+
// node_modules/lodash/_baseGetTag.js
|
|
13514
|
+
var require__baseGetTag = __commonJS((exports, module) => {
|
|
13515
|
+
var Symbol2 = require__Symbol();
|
|
13516
|
+
var getRawTag = require__getRawTag();
|
|
13517
|
+
var objectToString3 = require__objectToString();
|
|
13518
|
+
var nullTag = "[object Null]";
|
|
13519
|
+
var undefinedTag = "[object Undefined]";
|
|
13520
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined;
|
|
13521
|
+
function baseGetTag(value) {
|
|
13522
|
+
if (value == null) {
|
|
13523
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
13524
|
+
}
|
|
13525
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString3(value);
|
|
13482
13526
|
}
|
|
13483
|
-
|
|
13484
|
-
|
|
13527
|
+
module.exports = baseGetTag;
|
|
13528
|
+
});
|
|
13529
|
+
|
|
13530
|
+
// node_modules/lodash/isObjectLike.js
|
|
13531
|
+
var require_isObjectLike = __commonJS((exports, module) => {
|
|
13532
|
+
function isObjectLike(value) {
|
|
13533
|
+
return value != null && typeof value == "object";
|
|
13485
13534
|
}
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13535
|
+
module.exports = isObjectLike;
|
|
13536
|
+
});
|
|
13537
|
+
|
|
13538
|
+
// node_modules/lodash/isSymbol.js
|
|
13539
|
+
var require_isSymbol = __commonJS((exports, module) => {
|
|
13540
|
+
var baseGetTag = require__baseGetTag();
|
|
13541
|
+
var isObjectLike = require_isObjectLike();
|
|
13542
|
+
var symbolTag = "[object Symbol]";
|
|
13543
|
+
function isSymbol(value) {
|
|
13544
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
13545
|
+
}
|
|
13546
|
+
module.exports = isSymbol;
|
|
13547
|
+
});
|
|
13548
|
+
|
|
13549
|
+
// node_modules/lodash/_baseToString.js
|
|
13550
|
+
var require__baseToString = __commonJS((exports, module) => {
|
|
13551
|
+
var Symbol2 = require__Symbol();
|
|
13552
|
+
var arrayMap = require__arrayMap();
|
|
13553
|
+
var isArray = require_isArray();
|
|
13554
|
+
var isSymbol = require_isSymbol();
|
|
13555
|
+
var INFINITY = 1 / 0;
|
|
13489
13556
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined;
|
|
13490
13557
|
var symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
13491
13558
|
function baseToString(value) {
|
|
13492
13559
|
if (typeof value == "string") {
|
|
13493
13560
|
return value;
|
|
13494
13561
|
}
|
|
13562
|
+
if (isArray(value)) {
|
|
13563
|
+
return arrayMap(value, baseToString) + "";
|
|
13564
|
+
}
|
|
13495
13565
|
if (isSymbol(value)) {
|
|
13496
13566
|
return symbolToString ? symbolToString.call(value) : "";
|
|
13497
13567
|
}
|
|
13498
13568
|
var result = value + "";
|
|
13499
13569
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
13500
13570
|
}
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
return !!value && typeof value == "object";
|
|
13508
|
-
}
|
|
13509
|
-
function isSymbol(value) {
|
|
13510
|
-
return typeof value == "symbol" || isObjectLike(value) && objectToString3.call(value) == symbolTag;
|
|
13511
|
-
}
|
|
13571
|
+
module.exports = baseToString;
|
|
13572
|
+
});
|
|
13573
|
+
|
|
13574
|
+
// node_modules/lodash/toString.js
|
|
13575
|
+
var require_toString = __commonJS((exports, module) => {
|
|
13576
|
+
var baseToString = require__baseToString();
|
|
13512
13577
|
function toString2(value) {
|
|
13513
13578
|
return value == null ? "" : baseToString(value);
|
|
13514
13579
|
}
|
|
13580
|
+
module.exports = toString2;
|
|
13581
|
+
});
|
|
13582
|
+
|
|
13583
|
+
// node_modules/lodash/deburr.js
|
|
13584
|
+
var require_deburr = __commonJS((exports, module) => {
|
|
13585
|
+
var deburrLetter = require__deburrLetter();
|
|
13586
|
+
var toString2 = require_toString();
|
|
13587
|
+
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
13588
|
+
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
13589
|
+
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
13590
|
+
var rsComboSymbolsRange = "\\u20d0-\\u20ff";
|
|
13591
|
+
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
13592
|
+
var rsCombo = "[" + rsComboRange + "]";
|
|
13593
|
+
var reComboMark = RegExp(rsCombo, "g");
|
|
13515
13594
|
function deburr(string4) {
|
|
13516
13595
|
string4 = toString2(string4);
|
|
13517
13596
|
return string4 && string4.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
13518
13597
|
}
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13598
|
+
module.exports = deburr;
|
|
13599
|
+
});
|
|
13600
|
+
|
|
13601
|
+
// node_modules/lodash/_asciiWords.js
|
|
13602
|
+
var require__asciiWords = __commonJS((exports, module) => {
|
|
13603
|
+
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
13604
|
+
function asciiWords(string4) {
|
|
13605
|
+
return string4.match(reAsciiWord) || [];
|
|
13606
|
+
}
|
|
13607
|
+
module.exports = asciiWords;
|
|
13608
|
+
});
|
|
13609
|
+
|
|
13610
|
+
// node_modules/lodash/_hasUnicodeWord.js
|
|
13611
|
+
var require__hasUnicodeWord = __commonJS((exports, module) => {
|
|
13612
|
+
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
13613
|
+
function hasUnicodeWord(string4) {
|
|
13614
|
+
return reHasUnicodeWord.test(string4);
|
|
13615
|
+
}
|
|
13616
|
+
module.exports = hasUnicodeWord;
|
|
13617
|
+
});
|
|
13618
|
+
|
|
13619
|
+
// node_modules/lodash/_unicodeWords.js
|
|
13620
|
+
var require__unicodeWords = __commonJS((exports, module) => {
|
|
13621
|
+
var rsAstralRange = "\\ud800-\\udfff";
|
|
13622
|
+
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
13623
|
+
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
13624
|
+
var rsComboSymbolsRange = "\\u20d0-\\u20ff";
|
|
13625
|
+
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
13626
|
+
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
13627
|
+
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
13628
|
+
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
13629
|
+
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
13630
|
+
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
13631
|
+
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
13632
|
+
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
13633
|
+
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
13634
|
+
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
13635
|
+
var rsApos = "['’]";
|
|
13636
|
+
var rsBreak = "[" + rsBreakRange + "]";
|
|
13637
|
+
var rsCombo = "[" + rsComboRange + "]";
|
|
13638
|
+
var rsDigits = "\\d+";
|
|
13639
|
+
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
13640
|
+
var rsLower = "[" + rsLowerRange + "]";
|
|
13641
|
+
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
13642
|
+
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
13643
|
+
var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
|
|
13644
|
+
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
13645
|
+
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
13646
|
+
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
13647
|
+
var rsUpper = "[" + rsUpperRange + "]";
|
|
13648
|
+
var rsZWJ = "\\u200d";
|
|
13649
|
+
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
13650
|
+
var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
13651
|
+
var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
13652
|
+
var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
13653
|
+
var reOptMod = rsModifier + "?";
|
|
13654
|
+
var rsOptVar = "[" + rsVarRange + "]?";
|
|
13655
|
+
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
13656
|
+
var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
|
|
13657
|
+
var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
|
|
13658
|
+
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
13659
|
+
var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq;
|
|
13660
|
+
var reUnicodeWord = RegExp([
|
|
13661
|
+
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
|
13662
|
+
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
|
|
13663
|
+
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
13664
|
+
rsUpper + "+" + rsOptContrUpper,
|
|
13665
|
+
rsOrdUpper,
|
|
13666
|
+
rsOrdLower,
|
|
13667
|
+
rsDigits,
|
|
13668
|
+
rsEmoji
|
|
13669
|
+
].join("|"), "g");
|
|
13670
|
+
function unicodeWords(string4) {
|
|
13671
|
+
return string4.match(reUnicodeWord) || [];
|
|
13672
|
+
}
|
|
13673
|
+
module.exports = unicodeWords;
|
|
13674
|
+
});
|
|
13675
|
+
|
|
13676
|
+
// node_modules/lodash/words.js
|
|
13677
|
+
var require_words = __commonJS((exports, module) => {
|
|
13678
|
+
var asciiWords = require__asciiWords();
|
|
13679
|
+
var hasUnicodeWord = require__hasUnicodeWord();
|
|
13680
|
+
var toString2 = require_toString();
|
|
13681
|
+
var unicodeWords = require__unicodeWords();
|
|
13522
13682
|
function words(string4, pattern, guard) {
|
|
13523
13683
|
string4 = toString2(string4);
|
|
13524
13684
|
pattern = guard ? undefined : pattern;
|
|
@@ -13527,6 +13687,30 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
13527
13687
|
}
|
|
13528
13688
|
return string4.match(pattern) || [];
|
|
13529
13689
|
}
|
|
13690
|
+
module.exports = words;
|
|
13691
|
+
});
|
|
13692
|
+
|
|
13693
|
+
// node_modules/lodash/_createCompounder.js
|
|
13694
|
+
var require__createCompounder = __commonJS((exports, module) => {
|
|
13695
|
+
var arrayReduce = require__arrayReduce();
|
|
13696
|
+
var deburr = require_deburr();
|
|
13697
|
+
var words = require_words();
|
|
13698
|
+
var rsApos = "['’]";
|
|
13699
|
+
var reApos = RegExp(rsApos, "g");
|
|
13700
|
+
function createCompounder(callback) {
|
|
13701
|
+
return function(string4) {
|
|
13702
|
+
return arrayReduce(words(deburr(string4).replace(reApos, "")), callback, "");
|
|
13703
|
+
};
|
|
13704
|
+
}
|
|
13705
|
+
module.exports = createCompounder;
|
|
13706
|
+
});
|
|
13707
|
+
|
|
13708
|
+
// node_modules/lodash/kebabCase.js
|
|
13709
|
+
var require_kebabCase = __commonJS((exports, module) => {
|
|
13710
|
+
var createCompounder = require__createCompounder();
|
|
13711
|
+
var kebabCase = createCompounder(function(result, word, index) {
|
|
13712
|
+
return result + (index ? "-" : "") + word.toLowerCase();
|
|
13713
|
+
});
|
|
13530
13714
|
module.exports = kebabCase;
|
|
13531
13715
|
});
|
|
13532
13716
|
|
|
@@ -14609,7 +14793,7 @@ var require_lib2 = __commonJS((exports) => {
|
|
|
14609
14793
|
});
|
|
14610
14794
|
|
|
14611
14795
|
// node_modules/lodash/lodash.js
|
|
14612
|
-
var
|
|
14796
|
+
var require_lodash = __commonJS((exports, module) => {
|
|
14613
14797
|
(function() {
|
|
14614
14798
|
var undefined2;
|
|
14615
14799
|
var VERSION = "4.17.23";
|
|
@@ -117250,15 +117434,15 @@ var init_prettier = __esm(() => {
|
|
|
117250
117434
|
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
117251
117435
|
function partitionAbsoluteAndRelative(patterns) {
|
|
117252
117436
|
const absolute = [];
|
|
117253
|
-
const
|
|
117437
|
+
const relative22 = [];
|
|
117254
117438
|
for (const pattern of patterns) {
|
|
117255
117439
|
if (isAbsolute2(pattern)) {
|
|
117256
117440
|
absolute.push(pattern);
|
|
117257
117441
|
} else {
|
|
117258
|
-
|
|
117442
|
+
relative22.push(pattern);
|
|
117259
117443
|
}
|
|
117260
117444
|
}
|
|
117261
|
-
return [absolute,
|
|
117445
|
+
return [absolute, relative22];
|
|
117262
117446
|
}
|
|
117263
117447
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
117264
117448
|
function isAbsolute2(pattern) {
|
|
@@ -127599,7 +127783,7 @@ var require_AST = __commonJS((exports) => {
|
|
|
127599
127783
|
var require_JSONSchema = __commonJS((exports) => {
|
|
127600
127784
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
127601
127785
|
exports.isCompound = exports.isPrimitive = exports.isBoolean = exports.getRootSchema = exports.Intersection = exports.Types = exports.Parent = undefined;
|
|
127602
|
-
var lodash_1 =
|
|
127786
|
+
var lodash_1 = require_lodash();
|
|
127603
127787
|
exports.Parent = Symbol("Parent");
|
|
127604
127788
|
exports.Types = Symbol("Types");
|
|
127605
127789
|
exports.Intersection = Symbol("Intersection");
|
|
@@ -130406,7 +130590,7 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
130406
130590
|
};
|
|
130407
130591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
130408
130592
|
exports.parseFileAsJSONSchema = exports.isSchemaLike = exports.appendToDescription = exports.maybeStripDefault = exports.pathTransform = exports.escapeBlockComment = exports.log = exports.error = exports.generateName = exports.toSafeString = exports.stripExtension = exports.justName = exports.traverse = exports.Try = undefined;
|
|
130409
|
-
var lodash_1 =
|
|
130593
|
+
var lodash_1 = require_lodash();
|
|
130410
130594
|
var path_1 = __require("path");
|
|
130411
130595
|
var JSONSchema_1 = require_JSONSchema();
|
|
130412
130596
|
var js_yaml_1 = __importDefault(require_js_yaml3());
|
|
@@ -130737,7 +130921,7 @@ ${values.join(`
|
|
|
130737
130921
|
var require_generator = __commonJS((exports) => {
|
|
130738
130922
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
130739
130923
|
exports.generateType = exports.generate = undefined;
|
|
130740
|
-
var lodash_1 =
|
|
130924
|
+
var lodash_1 = require_lodash();
|
|
130741
130925
|
var index_1 = require_src3();
|
|
130742
130926
|
var AST_1 = require_AST();
|
|
130743
130927
|
var utils_1 = require_utils7();
|
|
@@ -131000,7 +131184,7 @@ var require_generator = __commonJS((exports) => {
|
|
|
131000
131184
|
var require_typesOfSchema = __commonJS((exports) => {
|
|
131001
131185
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
131002
131186
|
exports.typesOfSchema = undefined;
|
|
131003
|
-
var lodash_1 =
|
|
131187
|
+
var lodash_1 = require_lodash();
|
|
131004
131188
|
var JSONSchema_1 = require_JSONSchema();
|
|
131005
131189
|
function typesOfSchema(schema9) {
|
|
131006
131190
|
if (schema9.tsType) {
|
|
@@ -131359,7 +131543,7 @@ var require_normalizer = __commonJS((exports) => {
|
|
|
131359
131543
|
var require_optimizer = __commonJS((exports) => {
|
|
131360
131544
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
131361
131545
|
exports.optimize = undefined;
|
|
131362
|
-
var lodash_1 =
|
|
131546
|
+
var lodash_1 = require_lodash();
|
|
131363
131547
|
var generator_1 = require_generator();
|
|
131364
131548
|
var AST_1 = require_AST();
|
|
131365
131549
|
var utils_1 = require_utils7();
|
|
@@ -131425,7 +131609,7 @@ var require_optimizer = __commonJS((exports) => {
|
|
|
131425
131609
|
var require_parser = __commonJS((exports) => {
|
|
131426
131610
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
131427
131611
|
exports.parse = undefined;
|
|
131428
|
-
var lodash_1 =
|
|
131612
|
+
var lodash_1 = require_lodash();
|
|
131429
131613
|
var util_1 = __require("util");
|
|
131430
131614
|
var applySchemaTyping_1 = require_applySchemaTyping();
|
|
131431
131615
|
var AST_1 = require_AST();
|
|
@@ -132213,7 +132397,7 @@ var require_url = __commonJS((exports) => {
|
|
|
132213
132397
|
exports.fromFileSystemPath = fromFileSystemPath;
|
|
132214
132398
|
exports.toFileSystemPath = toFileSystemPath;
|
|
132215
132399
|
exports.safePointerToPath = safePointerToPath;
|
|
132216
|
-
exports.relative =
|
|
132400
|
+
exports.relative = relative4;
|
|
132217
132401
|
var convert_path_to_posix_1 = __importDefault(require_convert_path_to_posix());
|
|
132218
132402
|
var path_1 = __importStar(__require("path"));
|
|
132219
132403
|
var forwardSlashPattern = /\//g;
|
|
@@ -132363,7 +132547,7 @@ var require_url = __commonJS((exports) => {
|
|
|
132363
132547
|
return decodeURIComponent(value).replace(jsonPointerSlash, "/").replace(jsonPointerTilde, "~");
|
|
132364
132548
|
});
|
|
132365
132549
|
}
|
|
132366
|
-
function
|
|
132550
|
+
function relative4(from, to5) {
|
|
132367
132551
|
if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
|
|
132368
132552
|
return resolve6(from, to5);
|
|
132369
132553
|
}
|
|
@@ -137278,7 +137462,7 @@ var require_linker = __commonJS((exports) => {
|
|
|
137278
137462
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
137279
137463
|
exports.link = undefined;
|
|
137280
137464
|
var JSONSchema_1 = require_JSONSchema();
|
|
137281
|
-
var lodash_1 =
|
|
137465
|
+
var lodash_1 = require_lodash();
|
|
137282
137466
|
function link2(schema9, parent = null) {
|
|
137283
137467
|
if (!Array.isArray(schema9) && !(0, lodash_1.isPlainObject)(schema9)) {
|
|
137284
137468
|
return schema9;
|
|
@@ -137346,7 +137530,7 @@ var require_src3 = __commonJS((exports) => {
|
|
|
137346
137530
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
137347
137531
|
exports.ValidationError = exports.compile = exports.compileFromFile = exports.DEFAULT_OPTIONS = undefined;
|
|
137348
137532
|
var fs_1 = __require("fs");
|
|
137349
|
-
var lodash_1 =
|
|
137533
|
+
var lodash_1 = require_lodash();
|
|
137350
137534
|
var path_1 = __require("path");
|
|
137351
137535
|
var formatter_1 = require_formatter();
|
|
137352
137536
|
var generator_1 = require_generator();
|
|
@@ -138430,7 +138614,7 @@ var require_depd = __commonJS((exports, module) => {
|
|
|
138430
138614
|
* Copyright(c) 2014-2018 Douglas Christopher Wilson
|
|
138431
138615
|
* MIT Licensed
|
|
138432
138616
|
*/
|
|
138433
|
-
var
|
|
138617
|
+
var relative4 = __require("path").relative;
|
|
138434
138618
|
module.exports = depd;
|
|
138435
138619
|
var basePath = process.cwd();
|
|
138436
138620
|
function containsNamespace(str, namespace) {
|
|
@@ -138626,7 +138810,7 @@ var require_depd = __commonJS((exports, module) => {
|
|
|
138626
138810
|
return formatted;
|
|
138627
138811
|
}
|
|
138628
138812
|
function formatLocation(callSite) {
|
|
138629
|
-
return
|
|
138813
|
+
return relative4(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2];
|
|
138630
138814
|
}
|
|
138631
138815
|
function getStack() {
|
|
138632
138816
|
var limit = Error.stackTraceLimit;
|
|
@@ -156088,7 +156272,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
156088
156272
|
var debug = require_src4()("express:view");
|
|
156089
156273
|
var path18 = __require("node:path");
|
|
156090
156274
|
var fs28 = __require("node:fs");
|
|
156091
|
-
var
|
|
156275
|
+
var dirname12 = path18.dirname;
|
|
156092
156276
|
var basename4 = path18.basename;
|
|
156093
156277
|
var extname2 = path18.extname;
|
|
156094
156278
|
var join15 = path18.join;
|
|
@@ -156127,7 +156311,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
156127
156311
|
for (var i5 = 0;i5 < roots.length && !path19; i5++) {
|
|
156128
156312
|
var root2 = roots[i5];
|
|
156129
156313
|
var loc = resolve6(root2, name2);
|
|
156130
|
-
var dir =
|
|
156314
|
+
var dir = dirname12(loc);
|
|
156131
156315
|
var file2 = basename4(loc);
|
|
156132
156316
|
path19 = this.resolve(dir, file2);
|
|
156133
156317
|
}
|
|
@@ -161774,8 +161958,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
161774
161958
|
}
|
|
161775
161959
|
return parsed;
|
|
161776
161960
|
}
|
|
161777
|
-
function resolveUrl(
|
|
161778
|
-
return useNativeURL ? new URL2(
|
|
161961
|
+
function resolveUrl(relative4, base) {
|
|
161962
|
+
return useNativeURL ? new URL2(relative4, base) : parseUrl(url3.resolve(base, relative4));
|
|
161779
161963
|
}
|
|
161780
161964
|
function validateUrl(input) {
|
|
161781
161965
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -210218,6 +210402,168 @@ var require_multer = __commonJS((exports, module) => {
|
|
|
210218
210402
|
module.exports.MulterError = MulterError;
|
|
210219
210403
|
});
|
|
210220
210404
|
|
|
210405
|
+
// node_modules/lodash/isObject.js
|
|
210406
|
+
var require_isObject = __commonJS((exports, module) => {
|
|
210407
|
+
function isObject5(value) {
|
|
210408
|
+
var type = typeof value;
|
|
210409
|
+
return value != null && (type == "object" || type == "function");
|
|
210410
|
+
}
|
|
210411
|
+
module.exports = isObject5;
|
|
210412
|
+
});
|
|
210413
|
+
|
|
210414
|
+
// node_modules/lodash/now.js
|
|
210415
|
+
var require_now = __commonJS((exports, module) => {
|
|
210416
|
+
var root2 = require__root();
|
|
210417
|
+
var now = function() {
|
|
210418
|
+
return root2.Date.now();
|
|
210419
|
+
};
|
|
210420
|
+
module.exports = now;
|
|
210421
|
+
});
|
|
210422
|
+
|
|
210423
|
+
// node_modules/lodash/_trimmedEndIndex.js
|
|
210424
|
+
var require__trimmedEndIndex = __commonJS((exports, module) => {
|
|
210425
|
+
var reWhitespace = /\s/;
|
|
210426
|
+
function trimmedEndIndex(string4) {
|
|
210427
|
+
var index = string4.length;
|
|
210428
|
+
while (index-- && reWhitespace.test(string4.charAt(index))) {}
|
|
210429
|
+
return index;
|
|
210430
|
+
}
|
|
210431
|
+
module.exports = trimmedEndIndex;
|
|
210432
|
+
});
|
|
210433
|
+
|
|
210434
|
+
// node_modules/lodash/_baseTrim.js
|
|
210435
|
+
var require__baseTrim = __commonJS((exports, module) => {
|
|
210436
|
+
var trimmedEndIndex = require__trimmedEndIndex();
|
|
210437
|
+
var reTrimStart = /^\s+/;
|
|
210438
|
+
function baseTrim(string4) {
|
|
210439
|
+
return string4 ? string4.slice(0, trimmedEndIndex(string4) + 1).replace(reTrimStart, "") : string4;
|
|
210440
|
+
}
|
|
210441
|
+
module.exports = baseTrim;
|
|
210442
|
+
});
|
|
210443
|
+
|
|
210444
|
+
// node_modules/lodash/toNumber.js
|
|
210445
|
+
var require_toNumber = __commonJS((exports, module) => {
|
|
210446
|
+
var baseTrim = require__baseTrim();
|
|
210447
|
+
var isObject5 = require_isObject();
|
|
210448
|
+
var isSymbol = require_isSymbol();
|
|
210449
|
+
var NAN = 0 / 0;
|
|
210450
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
210451
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
210452
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
210453
|
+
var freeParseInt = parseInt;
|
|
210454
|
+
function toNumber(value) {
|
|
210455
|
+
if (typeof value == "number") {
|
|
210456
|
+
return value;
|
|
210457
|
+
}
|
|
210458
|
+
if (isSymbol(value)) {
|
|
210459
|
+
return NAN;
|
|
210460
|
+
}
|
|
210461
|
+
if (isObject5(value)) {
|
|
210462
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
210463
|
+
value = isObject5(other) ? other + "" : other;
|
|
210464
|
+
}
|
|
210465
|
+
if (typeof value != "string") {
|
|
210466
|
+
return value === 0 ? value : +value;
|
|
210467
|
+
}
|
|
210468
|
+
value = baseTrim(value);
|
|
210469
|
+
var isBinary = reIsBinary.test(value);
|
|
210470
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
210471
|
+
}
|
|
210472
|
+
module.exports = toNumber;
|
|
210473
|
+
});
|
|
210474
|
+
|
|
210475
|
+
// node_modules/lodash/debounce.js
|
|
210476
|
+
var require_debounce = __commonJS((exports, module) => {
|
|
210477
|
+
var isObject5 = require_isObject();
|
|
210478
|
+
var now = require_now();
|
|
210479
|
+
var toNumber = require_toNumber();
|
|
210480
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
210481
|
+
var nativeMax = Math.max;
|
|
210482
|
+
var nativeMin = Math.min;
|
|
210483
|
+
function debounce(func, wait, options8) {
|
|
210484
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
210485
|
+
if (typeof func != "function") {
|
|
210486
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
210487
|
+
}
|
|
210488
|
+
wait = toNumber(wait) || 0;
|
|
210489
|
+
if (isObject5(options8)) {
|
|
210490
|
+
leading = !!options8.leading;
|
|
210491
|
+
maxing = "maxWait" in options8;
|
|
210492
|
+
maxWait = maxing ? nativeMax(toNumber(options8.maxWait) || 0, wait) : maxWait;
|
|
210493
|
+
trailing = "trailing" in options8 ? !!options8.trailing : trailing;
|
|
210494
|
+
}
|
|
210495
|
+
function invokeFunc(time3) {
|
|
210496
|
+
var args = lastArgs, thisArg = lastThis;
|
|
210497
|
+
lastArgs = lastThis = undefined;
|
|
210498
|
+
lastInvokeTime = time3;
|
|
210499
|
+
result = func.apply(thisArg, args);
|
|
210500
|
+
return result;
|
|
210501
|
+
}
|
|
210502
|
+
function leadingEdge(time3) {
|
|
210503
|
+
lastInvokeTime = time3;
|
|
210504
|
+
timerId = setTimeout(timerExpired, wait);
|
|
210505
|
+
return leading ? invokeFunc(time3) : result;
|
|
210506
|
+
}
|
|
210507
|
+
function remainingWait(time3) {
|
|
210508
|
+
var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
210509
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
210510
|
+
}
|
|
210511
|
+
function shouldInvoke(time3) {
|
|
210512
|
+
var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime;
|
|
210513
|
+
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
210514
|
+
}
|
|
210515
|
+
function timerExpired() {
|
|
210516
|
+
var time3 = now();
|
|
210517
|
+
if (shouldInvoke(time3)) {
|
|
210518
|
+
return trailingEdge(time3);
|
|
210519
|
+
}
|
|
210520
|
+
timerId = setTimeout(timerExpired, remainingWait(time3));
|
|
210521
|
+
}
|
|
210522
|
+
function trailingEdge(time3) {
|
|
210523
|
+
timerId = undefined;
|
|
210524
|
+
if (trailing && lastArgs) {
|
|
210525
|
+
return invokeFunc(time3);
|
|
210526
|
+
}
|
|
210527
|
+
lastArgs = lastThis = undefined;
|
|
210528
|
+
return result;
|
|
210529
|
+
}
|
|
210530
|
+
function cancel() {
|
|
210531
|
+
if (timerId !== undefined) {
|
|
210532
|
+
clearTimeout(timerId);
|
|
210533
|
+
}
|
|
210534
|
+
lastInvokeTime = 0;
|
|
210535
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
210536
|
+
}
|
|
210537
|
+
function flush() {
|
|
210538
|
+
return timerId === undefined ? result : trailingEdge(now());
|
|
210539
|
+
}
|
|
210540
|
+
function debounced() {
|
|
210541
|
+
var time3 = now(), isInvoking = shouldInvoke(time3);
|
|
210542
|
+
lastArgs = arguments;
|
|
210543
|
+
lastThis = this;
|
|
210544
|
+
lastCallTime = time3;
|
|
210545
|
+
if (isInvoking) {
|
|
210546
|
+
if (timerId === undefined) {
|
|
210547
|
+
return leadingEdge(lastCallTime);
|
|
210548
|
+
}
|
|
210549
|
+
if (maxing) {
|
|
210550
|
+
clearTimeout(timerId);
|
|
210551
|
+
timerId = setTimeout(timerExpired, wait);
|
|
210552
|
+
return invokeFunc(lastCallTime);
|
|
210553
|
+
}
|
|
210554
|
+
}
|
|
210555
|
+
if (timerId === undefined) {
|
|
210556
|
+
timerId = setTimeout(timerExpired, wait);
|
|
210557
|
+
}
|
|
210558
|
+
return result;
|
|
210559
|
+
}
|
|
210560
|
+
debounced.cancel = cancel;
|
|
210561
|
+
debounced.flush = flush;
|
|
210562
|
+
return debounced;
|
|
210563
|
+
}
|
|
210564
|
+
module.exports = debounce;
|
|
210565
|
+
});
|
|
210566
|
+
|
|
210221
210567
|
// node_modules/@vercel/detect-agent/dist/index.js
|
|
210222
210568
|
var require_dist5 = __commonJS((exports, module) => {
|
|
210223
210569
|
var __defProp4 = Object.defineProperty;
|
|
@@ -210243,8 +210589,8 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
210243
210589
|
determineAgent: () => determineAgent
|
|
210244
210590
|
});
|
|
210245
210591
|
module.exports = __toCommonJS(src_exports);
|
|
210246
|
-
var
|
|
210247
|
-
var
|
|
210592
|
+
var import_promises22 = __require("node:fs/promises");
|
|
210593
|
+
var import_node_fs21 = __require("node:fs");
|
|
210248
210594
|
var DEVIN_LOCAL_PATH = "/opt/.devin";
|
|
210249
210595
|
var CURSOR2 = "cursor";
|
|
210250
210596
|
var CURSOR_CLI = "cursor-cli";
|
|
@@ -210301,7 +210647,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
210301
210647
|
return { isAgent: true, agent: { name: REPLIT } };
|
|
210302
210648
|
}
|
|
210303
210649
|
try {
|
|
210304
|
-
await (0,
|
|
210650
|
+
await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs21.constants.F_OK);
|
|
210305
210651
|
return { isAgent: true, agent: { name: DEVIN } };
|
|
210306
210652
|
} catch (error48) {}
|
|
210307
210653
|
return { isAgent: false, agent: undefined };
|
|
@@ -210325,7 +210671,7 @@ var {
|
|
|
210325
210671
|
} = import__.default;
|
|
210326
210672
|
|
|
210327
210673
|
// src/cli/commands/agents/pull.ts
|
|
210328
|
-
import { dirname as
|
|
210674
|
+
import { dirname as dirname8, join as join9 } from "node:path";
|
|
210329
210675
|
|
|
210330
210676
|
// node_modules/@clack/core/dist/index.mjs
|
|
210331
210677
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -232824,7 +233170,7 @@ var generateGlobTasks = normalizeArguments(generateTasks);
|
|
|
232824
233170
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
232825
233171
|
|
|
232826
233172
|
// src/core/project/config.ts
|
|
232827
|
-
import { dirname as
|
|
233173
|
+
import { dirname as dirname6, join as join6 } from "node:path";
|
|
232828
233174
|
|
|
232829
233175
|
// src/core/resources/agent/schema.ts
|
|
232830
233176
|
var EntityOperationSchema = exports_external.enum(["create", "update", "delete", "read"]);
|
|
@@ -233634,7 +233980,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
233634
233980
|
return result.data;
|
|
233635
233981
|
}
|
|
233636
233982
|
// src/core/resources/function/config.ts
|
|
233637
|
-
import { dirname as dirname4, join as join5 } from "node:path";
|
|
233983
|
+
import { basename as basename2, dirname as dirname4, join as join5, relative } from "node:path";
|
|
233638
233984
|
async function readFunctionConfig(configPath) {
|
|
233639
233985
|
const parsed = await readJsonFile(configPath);
|
|
233640
233986
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -233652,7 +233998,7 @@ async function readFunction(configPath) {
|
|
|
233652
233998
|
hints: [{ message: "Check the 'entry' field in your function config" }]
|
|
233653
233999
|
});
|
|
233654
234000
|
}
|
|
233655
|
-
const filePaths = await globby("
|
|
234001
|
+
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
233656
234002
|
cwd: functionDir,
|
|
233657
234003
|
absolute: true
|
|
233658
234004
|
});
|
|
@@ -233663,11 +234009,37 @@ async function readAllFunctions(functionsDir) {
|
|
|
233663
234009
|
if (!await pathExists(functionsDir)) {
|
|
233664
234010
|
return [];
|
|
233665
234011
|
}
|
|
233666
|
-
const configFiles = await globby(
|
|
234012
|
+
const configFiles = await globby(`**/${FUNCTION_CONFIG_FILE}`, {
|
|
234013
|
+
cwd: functionsDir,
|
|
234014
|
+
absolute: true
|
|
234015
|
+
});
|
|
234016
|
+
const entryFiles = await globby(`**/entry.{js,ts}`, {
|
|
233667
234017
|
cwd: functionsDir,
|
|
233668
234018
|
absolute: true
|
|
233669
234019
|
});
|
|
233670
|
-
const
|
|
234020
|
+
const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
|
|
234021
|
+
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname4(entryFile)));
|
|
234022
|
+
const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
234023
|
+
const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
|
|
234024
|
+
const functionDir = dirname4(entryFile);
|
|
234025
|
+
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
234026
|
+
cwd: functionDir,
|
|
234027
|
+
absolute: true
|
|
234028
|
+
});
|
|
234029
|
+
const name2 = relative(functionsDir, functionDir).split(/[/\\]/).join("/");
|
|
234030
|
+
if (!name2) {
|
|
234031
|
+
throw new InvalidInputError("entry.js/entry.ts must be inside a subfolder of the functions directory", {
|
|
234032
|
+
hints: [
|
|
234033
|
+
{
|
|
234034
|
+
message: `Move ${entryFile} into a subfolder (e.g. functions/myFunc/entry.ts)`
|
|
234035
|
+
}
|
|
234036
|
+
]
|
|
234037
|
+
});
|
|
234038
|
+
}
|
|
234039
|
+
const entry = basename2(entryFile);
|
|
234040
|
+
return { name: name2, entry, entryPath: entryFile, filePaths };
|
|
234041
|
+
}));
|
|
234042
|
+
const functions = [...functionsFromConfig, ...functionsWithoutConfig];
|
|
233671
234043
|
const names = new Set;
|
|
233672
234044
|
for (const fn of functions) {
|
|
233673
234045
|
if (names.has(fn.name)) {
|
|
@@ -233678,11 +234050,13 @@ async function readAllFunctions(functionsDir) {
|
|
|
233678
234050
|
return functions;
|
|
233679
234051
|
}
|
|
233680
234052
|
// src/core/resources/function/deploy.ts
|
|
233681
|
-
import {
|
|
234053
|
+
import { dirname as dirname5, relative as relative2 } from "node:path";
|
|
233682
234054
|
async function loadFunctionCode(fn) {
|
|
234055
|
+
const functionDir = dirname5(fn.entryPath);
|
|
233683
234056
|
const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
|
|
233684
234057
|
const content = await readTextFile(filePath);
|
|
233685
|
-
|
|
234058
|
+
const path11 = relative2(functionDir, filePath).split(/[/\\]/).join("/");
|
|
234059
|
+
return { path: path11, content };
|
|
233686
234060
|
}));
|
|
233687
234061
|
return { ...fn, files: loadedFiles };
|
|
233688
234062
|
}
|
|
@@ -233708,12 +234082,12 @@ async function findConfigInDir(dir) {
|
|
|
233708
234082
|
}
|
|
233709
234083
|
async function findProjectRoot(startPath) {
|
|
233710
234084
|
let current = startPath || process.cwd();
|
|
233711
|
-
while (current !==
|
|
234085
|
+
while (current !== dirname6(current)) {
|
|
233712
234086
|
const configPath = await findConfigInDir(current);
|
|
233713
234087
|
if (configPath) {
|
|
233714
234088
|
return { root: current, configPath };
|
|
233715
234089
|
}
|
|
233716
|
-
current =
|
|
234090
|
+
current = dirname6(current);
|
|
233717
234091
|
}
|
|
233718
234092
|
return null;
|
|
233719
234093
|
}
|
|
@@ -233735,7 +234109,7 @@ async function readProjectConfig(projectRoot) {
|
|
|
233735
234109
|
throw new SchemaValidationError("Invalid project configuration", result.error, configPath);
|
|
233736
234110
|
}
|
|
233737
234111
|
const project = result.data;
|
|
233738
|
-
const configDir =
|
|
234112
|
+
const configDir = dirname6(configPath);
|
|
233739
234113
|
const [entities, functions, agents, connectors] = await Promise.all([
|
|
233740
234114
|
entityResource.readAll(join6(configDir, project.entitiesDir)),
|
|
233741
234115
|
functionResource.readAll(join6(configDir, project.functionsDir)),
|
|
@@ -233837,7 +234211,7 @@ async function readAppConfig(projectRoot) {
|
|
|
233837
234211
|
// src/core/project/template.ts
|
|
233838
234212
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
233839
234213
|
var import_front_matter = __toESM(require_front_matter(), 1);
|
|
233840
|
-
import { dirname as
|
|
234214
|
+
import { dirname as dirname7, join as join7 } from "node:path";
|
|
233841
234215
|
async function listTemplates() {
|
|
233842
234216
|
const parsed = await readJsonFile(getTemplatesIndexPath());
|
|
233843
234217
|
const result = TemplatesConfigSchema.safeParse(parsed);
|
|
@@ -233859,7 +234233,7 @@ async function renderTemplate(template, destPath, data) {
|
|
|
233859
234233
|
if (file2.endsWith(".ejs")) {
|
|
233860
234234
|
const rendered = await import_ejs.default.renderFile(srcPath, data);
|
|
233861
234235
|
const { attributes, body } = import_front_matter.default(rendered);
|
|
233862
|
-
const destFile = attributes.outputFileName ? join7(
|
|
234236
|
+
const destFile = attributes.outputFileName ? join7(dirname7(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
|
|
233863
234237
|
const destFilePath = join7(destPath, destFile);
|
|
233864
234238
|
await writeFile(destFilePath, body);
|
|
233865
234239
|
} else {
|
|
@@ -234212,7 +234586,8 @@ async function setSecrets(secrets) {
|
|
|
234212
234586
|
let response;
|
|
234213
234587
|
try {
|
|
234214
234588
|
response = await appClient.post("secrets", {
|
|
234215
|
-
json: secrets
|
|
234589
|
+
json: secrets,
|
|
234590
|
+
timeout: false
|
|
234216
234591
|
});
|
|
234217
234592
|
} catch (error48) {
|
|
234218
234593
|
throw await ApiError.fromHttpError(error48, "setting secrets");
|
|
@@ -241534,7 +241909,7 @@ var {
|
|
|
241534
241909
|
// package.json
|
|
241535
241910
|
var package_default = {
|
|
241536
241911
|
name: "base44",
|
|
241537
|
-
version: "0.0.
|
|
241912
|
+
version: "0.0.37",
|
|
241538
241913
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
241539
241914
|
type: "module",
|
|
241540
241915
|
bin: {
|
|
@@ -241580,11 +241955,12 @@ var package_default = {
|
|
|
241580
241955
|
"@types/ejs": "^3.1.5",
|
|
241581
241956
|
"@types/express": "^5.0.6",
|
|
241582
241957
|
"@types/json-schema": "^7.0.15",
|
|
241583
|
-
"@types/lodash
|
|
241584
|
-
"@types/node": "^22.10.5",
|
|
241958
|
+
"@types/lodash": "^4.17.24",
|
|
241585
241959
|
"@types/multer": "^2.0.0",
|
|
241960
|
+
"@types/node": "^22.10.5",
|
|
241586
241961
|
"@vercel/detect-agent": "^1.1.0",
|
|
241587
241962
|
chalk: "^5.6.2",
|
|
241963
|
+
chokidar: "^5.0.0",
|
|
241588
241964
|
commander: "^12.1.0",
|
|
241589
241965
|
"common-tags": "^1.8.2",
|
|
241590
241966
|
cors: "^2.8.5",
|
|
@@ -241600,9 +241976,9 @@ var package_default = {
|
|
|
241600
241976
|
json5: "^2.2.3",
|
|
241601
241977
|
knip: "^5.83.1",
|
|
241602
241978
|
ky: "^1.14.2",
|
|
241603
|
-
|
|
241604
|
-
multer: "^2.0.0",
|
|
241979
|
+
lodash: "^4.17.23",
|
|
241605
241980
|
msw: "^2.12.10",
|
|
241981
|
+
multer: "^2.0.0",
|
|
241606
241982
|
nanoid: "^5.1.6",
|
|
241607
241983
|
open: "^11.0.0",
|
|
241608
241984
|
"p-wait-for": "^6.0.0",
|
|
@@ -241742,7 +242118,7 @@ function getDashboardUrl(projectId) {
|
|
|
241742
242118
|
// src/cli/commands/agents/pull.ts
|
|
241743
242119
|
async function pullAgentsAction() {
|
|
241744
242120
|
const { project: project2 } = await readProjectConfig();
|
|
241745
|
-
const configDir =
|
|
242121
|
+
const configDir = dirname8(project2.configPath);
|
|
241746
242122
|
const agentsDir = join9(configDir, project2.agentsDir);
|
|
241747
242123
|
const remoteAgents = await runTask("Fetching agents from Base44", async () => {
|
|
241748
242124
|
return await fetchAgents();
|
|
@@ -241837,10 +242213,10 @@ function getWhoamiCommand(context) {
|
|
|
241837
242213
|
}
|
|
241838
242214
|
|
|
241839
242215
|
// src/cli/commands/connectors/pull.ts
|
|
241840
|
-
import { dirname as
|
|
242216
|
+
import { dirname as dirname9, join as join10 } from "node:path";
|
|
241841
242217
|
async function pullConnectorsAction() {
|
|
241842
242218
|
const { project: project2 } = await readProjectConfig();
|
|
241843
|
-
const configDir =
|
|
242219
|
+
const configDir = dirname9(project2.configPath);
|
|
241844
242220
|
const connectorsDir = join10(configDir, project2.connectorsDir);
|
|
241845
242221
|
const remoteConnectors = await runTask("Fetching connectors from Base44", async () => {
|
|
241846
242222
|
return await listConnectors();
|
|
@@ -242729,7 +243105,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
242729
243105
|
|
|
242730
243106
|
// src/cli/commands/project/create.ts
|
|
242731
243107
|
import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
|
|
242732
|
-
var
|
|
243108
|
+
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
242733
243109
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
242734
243110
|
async function getTemplateById(templateId) {
|
|
242735
243111
|
const templates = await listTemplates();
|
|
@@ -242773,7 +243149,7 @@ async function createInteractive(options) {
|
|
|
242773
243149
|
});
|
|
242774
243150
|
},
|
|
242775
243151
|
projectPath: async ({ results }) => {
|
|
242776
|
-
const suggestedPath = await isDirEmpty() ? "./" : `./${
|
|
243152
|
+
const suggestedPath = await isDirEmpty() ? "./" : `./${import_kebabCase.default(results.name)}`;
|
|
242777
243153
|
return Ze({
|
|
242778
243154
|
message: "Where should we create your project?",
|
|
242779
243155
|
placeholder: suggestedPath,
|
|
@@ -243536,6 +243912,7 @@ function getTypesCommand(context) {
|
|
|
243536
243912
|
}
|
|
243537
243913
|
|
|
243538
243914
|
// src/cli/dev/dev-server/main.ts
|
|
243915
|
+
import { dirname as dirname15, join as join18 } from "node:path";
|
|
243539
243916
|
var import_cors = __toESM(require_lib4(), 1);
|
|
243540
243917
|
var import_express4 = __toESM(require_express(), 1);
|
|
243541
243918
|
|
|
@@ -243694,9 +244071,9 @@ function createDevLogger() {
|
|
|
243694
244071
|
|
|
243695
244072
|
// src/cli/dev/dev-server/function-manager.ts
|
|
243696
244073
|
import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
|
|
243697
|
-
import { dirname as
|
|
244074
|
+
import { dirname as dirname12, join as join15 } from "node:path";
|
|
243698
244075
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
243699
|
-
var __dirname5 =
|
|
244076
|
+
var __dirname5 = dirname12(fileURLToPath7(import.meta.url));
|
|
243700
244077
|
var WRAPPER_PATH = join15(__dirname5, "../deno-runtime/main.js");
|
|
243701
244078
|
var READY_TIMEOUT = 30000;
|
|
243702
244079
|
|
|
@@ -243743,6 +244120,10 @@ class FunctionManager {
|
|
|
243743
244120
|
try {
|
|
243744
244121
|
return await promise2;
|
|
243745
244122
|
} finally {
|
|
244123
|
+
if (!this.starting.has(name2) && this.running.has(name2)) {
|
|
244124
|
+
this.running.get(name2)?.process.kill();
|
|
244125
|
+
this.running.delete(name2);
|
|
244126
|
+
}
|
|
243746
244127
|
this.starting.delete(name2);
|
|
243747
244128
|
}
|
|
243748
244129
|
}
|
|
@@ -243758,9 +244139,13 @@ class FunctionManager {
|
|
|
243758
244139
|
this.setupProcessHandlers(name2, process21);
|
|
243759
244140
|
return this.waitForReady(name2, runningFunc);
|
|
243760
244141
|
}
|
|
244142
|
+
reload(functions) {
|
|
244143
|
+
this.stopAll();
|
|
244144
|
+
this.functions = new Map(functions.map((f7) => [f7.name, f7]));
|
|
244145
|
+
}
|
|
243761
244146
|
stopAll() {
|
|
243762
244147
|
for (const [name2, { process: process21 }] of this.running) {
|
|
243763
|
-
this.logger.log(`
|
|
244148
|
+
this.logger.log(`Stopping function: ${name2}`);
|
|
243764
244149
|
process21.kill();
|
|
243765
244150
|
}
|
|
243766
244151
|
this.running.clear();
|
|
@@ -243771,7 +244156,7 @@ class FunctionManager {
|
|
|
243771
244156
|
return getPorts({ exclude: usedPorts });
|
|
243772
244157
|
}
|
|
243773
244158
|
spawnFunction(func, port) {
|
|
243774
|
-
this.logger.log(`
|
|
244159
|
+
this.logger.log(`Spawning function "${func.name}" on port ${port}`);
|
|
243775
244160
|
const process21 = spawn2("deno", ["run", "--allow-all", WRAPPER_PATH], {
|
|
243776
244161
|
env: {
|
|
243777
244162
|
...globalThis.process.env,
|
|
@@ -243799,11 +244184,13 @@ class FunctionManager {
|
|
|
243799
244184
|
}
|
|
243800
244185
|
});
|
|
243801
244186
|
process21.on("exit", (code2) => {
|
|
243802
|
-
|
|
244187
|
+
if (code2 !== null) {
|
|
244188
|
+
this.logger.log(`Function "${name2}" exited with code ${code2}`);
|
|
244189
|
+
}
|
|
243803
244190
|
this.running.delete(name2);
|
|
243804
244191
|
});
|
|
243805
244192
|
process21.on("error", (error48) => {
|
|
243806
|
-
this.logger.error(`
|
|
244193
|
+
this.logger.error(`Function "${name2}" error:`, error48);
|
|
243807
244194
|
this.running.delete(name2);
|
|
243808
244195
|
});
|
|
243809
244196
|
}
|
|
@@ -244254,6 +244641,1707 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
|
|
|
244254
244641
|
return router;
|
|
244255
244642
|
}
|
|
244256
244643
|
|
|
244644
|
+
// src/cli/dev/dev-server/watcher.ts
|
|
244645
|
+
import { EventEmitter as EventEmitter4 } from "node:events";
|
|
244646
|
+
import { relative as relative6 } from "node:path";
|
|
244647
|
+
|
|
244648
|
+
// node_modules/chokidar/index.js
|
|
244649
|
+
import { EventEmitter as EventEmitter3 } from "node:events";
|
|
244650
|
+
import { stat as statcb, Stats } from "node:fs";
|
|
244651
|
+
import { readdir as readdir3, stat as stat4 } from "node:fs/promises";
|
|
244652
|
+
import * as sp3 from "node:path";
|
|
244653
|
+
|
|
244654
|
+
// node_modules/readdirp/index.js
|
|
244655
|
+
import { lstat as lstat2, readdir as readdir2, realpath, stat as stat2 } from "node:fs/promises";
|
|
244656
|
+
import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
|
|
244657
|
+
import { Readable as Readable6 } from "node:stream";
|
|
244658
|
+
var EntryTypes = {
|
|
244659
|
+
FILE_TYPE: "files",
|
|
244660
|
+
DIR_TYPE: "directories",
|
|
244661
|
+
FILE_DIR_TYPE: "files_directories",
|
|
244662
|
+
EVERYTHING_TYPE: "all"
|
|
244663
|
+
};
|
|
244664
|
+
var defaultOptions = {
|
|
244665
|
+
root: ".",
|
|
244666
|
+
fileFilter: (_entryInfo) => true,
|
|
244667
|
+
directoryFilter: (_entryInfo) => true,
|
|
244668
|
+
type: EntryTypes.FILE_TYPE,
|
|
244669
|
+
lstat: false,
|
|
244670
|
+
depth: 2147483648,
|
|
244671
|
+
alwaysStat: false,
|
|
244672
|
+
highWaterMark: 4096
|
|
244673
|
+
};
|
|
244674
|
+
Object.freeze(defaultOptions);
|
|
244675
|
+
var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
|
|
244676
|
+
var NORMAL_FLOW_ERRORS = new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
|
|
244677
|
+
var ALL_TYPES = [
|
|
244678
|
+
EntryTypes.DIR_TYPE,
|
|
244679
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244680
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
244681
|
+
EntryTypes.FILE_TYPE
|
|
244682
|
+
];
|
|
244683
|
+
var DIR_TYPES = new Set([
|
|
244684
|
+
EntryTypes.DIR_TYPE,
|
|
244685
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244686
|
+
EntryTypes.FILE_DIR_TYPE
|
|
244687
|
+
]);
|
|
244688
|
+
var FILE_TYPES2 = new Set([
|
|
244689
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244690
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
244691
|
+
EntryTypes.FILE_TYPE
|
|
244692
|
+
]);
|
|
244693
|
+
var isNormalFlowError = (error48) => NORMAL_FLOW_ERRORS.has(error48.code);
|
|
244694
|
+
var wantBigintFsStats = process.platform === "win32";
|
|
244695
|
+
var emptyFn = (_entryInfo) => true;
|
|
244696
|
+
var normalizeFilter = (filter2) => {
|
|
244697
|
+
if (filter2 === undefined)
|
|
244698
|
+
return emptyFn;
|
|
244699
|
+
if (typeof filter2 === "function")
|
|
244700
|
+
return filter2;
|
|
244701
|
+
if (typeof filter2 === "string") {
|
|
244702
|
+
const fl6 = filter2.trim();
|
|
244703
|
+
return (entry) => entry.basename === fl6;
|
|
244704
|
+
}
|
|
244705
|
+
if (Array.isArray(filter2)) {
|
|
244706
|
+
const trItems = filter2.map((item) => item.trim());
|
|
244707
|
+
return (entry) => trItems.some((f7) => entry.basename === f7);
|
|
244708
|
+
}
|
|
244709
|
+
return emptyFn;
|
|
244710
|
+
};
|
|
244711
|
+
|
|
244712
|
+
class ReaddirpStream extends Readable6 {
|
|
244713
|
+
parents;
|
|
244714
|
+
reading;
|
|
244715
|
+
parent;
|
|
244716
|
+
_stat;
|
|
244717
|
+
_maxDepth;
|
|
244718
|
+
_wantsDir;
|
|
244719
|
+
_wantsFile;
|
|
244720
|
+
_wantsEverything;
|
|
244721
|
+
_root;
|
|
244722
|
+
_isDirent;
|
|
244723
|
+
_statsProp;
|
|
244724
|
+
_rdOptions;
|
|
244725
|
+
_fileFilter;
|
|
244726
|
+
_directoryFilter;
|
|
244727
|
+
constructor(options8 = {}) {
|
|
244728
|
+
super({
|
|
244729
|
+
objectMode: true,
|
|
244730
|
+
autoDestroy: true,
|
|
244731
|
+
highWaterMark: options8.highWaterMark
|
|
244732
|
+
});
|
|
244733
|
+
const opts = { ...defaultOptions, ...options8 };
|
|
244734
|
+
const { root: root2, type } = opts;
|
|
244735
|
+
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
244736
|
+
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
244737
|
+
const statMethod = opts.lstat ? lstat2 : stat2;
|
|
244738
|
+
if (wantBigintFsStats) {
|
|
244739
|
+
this._stat = (path19) => statMethod(path19, { bigint: true });
|
|
244740
|
+
} else {
|
|
244741
|
+
this._stat = statMethod;
|
|
244742
|
+
}
|
|
244743
|
+
this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
|
|
244744
|
+
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
244745
|
+
this._wantsFile = type ? FILE_TYPES2.has(type) : false;
|
|
244746
|
+
this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
|
|
244747
|
+
this._root = presolve(root2);
|
|
244748
|
+
this._isDirent = !opts.alwaysStat;
|
|
244749
|
+
this._statsProp = this._isDirent ? "dirent" : "stats";
|
|
244750
|
+
this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
|
|
244751
|
+
this.parents = [this._exploreDir(root2, 1)];
|
|
244752
|
+
this.reading = false;
|
|
244753
|
+
this.parent = undefined;
|
|
244754
|
+
}
|
|
244755
|
+
async _read(batch) {
|
|
244756
|
+
if (this.reading)
|
|
244757
|
+
return;
|
|
244758
|
+
this.reading = true;
|
|
244759
|
+
try {
|
|
244760
|
+
while (!this.destroyed && batch > 0) {
|
|
244761
|
+
const par = this.parent;
|
|
244762
|
+
const fil = par && par.files;
|
|
244763
|
+
if (fil && fil.length > 0) {
|
|
244764
|
+
const { path: path19, depth } = par;
|
|
244765
|
+
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path19));
|
|
244766
|
+
const awaited = await Promise.all(slice);
|
|
244767
|
+
for (const entry of awaited) {
|
|
244768
|
+
if (!entry)
|
|
244769
|
+
continue;
|
|
244770
|
+
if (this.destroyed)
|
|
244771
|
+
return;
|
|
244772
|
+
const entryType = await this._getEntryType(entry);
|
|
244773
|
+
if (entryType === "directory" && this._directoryFilter(entry)) {
|
|
244774
|
+
if (depth <= this._maxDepth) {
|
|
244775
|
+
this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
|
244776
|
+
}
|
|
244777
|
+
if (this._wantsDir) {
|
|
244778
|
+
this.push(entry);
|
|
244779
|
+
batch--;
|
|
244780
|
+
}
|
|
244781
|
+
} else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
|
|
244782
|
+
if (this._wantsFile) {
|
|
244783
|
+
this.push(entry);
|
|
244784
|
+
batch--;
|
|
244785
|
+
}
|
|
244786
|
+
}
|
|
244787
|
+
}
|
|
244788
|
+
} else {
|
|
244789
|
+
const parent = this.parents.pop();
|
|
244790
|
+
if (!parent) {
|
|
244791
|
+
this.push(null);
|
|
244792
|
+
break;
|
|
244793
|
+
}
|
|
244794
|
+
this.parent = await parent;
|
|
244795
|
+
if (this.destroyed)
|
|
244796
|
+
return;
|
|
244797
|
+
}
|
|
244798
|
+
}
|
|
244799
|
+
} catch (error48) {
|
|
244800
|
+
this.destroy(error48);
|
|
244801
|
+
} finally {
|
|
244802
|
+
this.reading = false;
|
|
244803
|
+
}
|
|
244804
|
+
}
|
|
244805
|
+
async _exploreDir(path19, depth) {
|
|
244806
|
+
let files;
|
|
244807
|
+
try {
|
|
244808
|
+
files = await readdir2(path19, this._rdOptions);
|
|
244809
|
+
} catch (error48) {
|
|
244810
|
+
this._onError(error48);
|
|
244811
|
+
}
|
|
244812
|
+
return { files, depth, path: path19 };
|
|
244813
|
+
}
|
|
244814
|
+
async _formatEntry(dirent, path19) {
|
|
244815
|
+
let entry;
|
|
244816
|
+
const basename4 = this._isDirent ? dirent.name : dirent;
|
|
244817
|
+
try {
|
|
244818
|
+
const fullPath = presolve(pjoin(path19, basename4));
|
|
244819
|
+
entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
|
|
244820
|
+
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
244821
|
+
} catch (err) {
|
|
244822
|
+
this._onError(err);
|
|
244823
|
+
return;
|
|
244824
|
+
}
|
|
244825
|
+
return entry;
|
|
244826
|
+
}
|
|
244827
|
+
_onError(err) {
|
|
244828
|
+
if (isNormalFlowError(err) && !this.destroyed) {
|
|
244829
|
+
this.emit("warn", err);
|
|
244830
|
+
} else {
|
|
244831
|
+
this.destroy(err);
|
|
244832
|
+
}
|
|
244833
|
+
}
|
|
244834
|
+
async _getEntryType(entry) {
|
|
244835
|
+
if (!entry && this._statsProp in entry) {
|
|
244836
|
+
return "";
|
|
244837
|
+
}
|
|
244838
|
+
const stats = entry[this._statsProp];
|
|
244839
|
+
if (stats.isFile())
|
|
244840
|
+
return "file";
|
|
244841
|
+
if (stats.isDirectory())
|
|
244842
|
+
return "directory";
|
|
244843
|
+
if (stats && stats.isSymbolicLink()) {
|
|
244844
|
+
const full = entry.fullPath;
|
|
244845
|
+
try {
|
|
244846
|
+
const entryRealPath = await realpath(full);
|
|
244847
|
+
const entryRealPathStats = await lstat2(entryRealPath);
|
|
244848
|
+
if (entryRealPathStats.isFile()) {
|
|
244849
|
+
return "file";
|
|
244850
|
+
}
|
|
244851
|
+
if (entryRealPathStats.isDirectory()) {
|
|
244852
|
+
const len = entryRealPath.length;
|
|
244853
|
+
if (full.startsWith(entryRealPath) && full.substr(len, 1) === psep) {
|
|
244854
|
+
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
244855
|
+
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
244856
|
+
return this._onError(recursiveError);
|
|
244857
|
+
}
|
|
244858
|
+
return "directory";
|
|
244859
|
+
}
|
|
244860
|
+
} catch (error48) {
|
|
244861
|
+
this._onError(error48);
|
|
244862
|
+
return "";
|
|
244863
|
+
}
|
|
244864
|
+
}
|
|
244865
|
+
}
|
|
244866
|
+
_includeAsFile(entry) {
|
|
244867
|
+
const stats = entry && entry[this._statsProp];
|
|
244868
|
+
return stats && this._wantsEverything && !stats.isDirectory();
|
|
244869
|
+
}
|
|
244870
|
+
}
|
|
244871
|
+
function readdirp(root2, options8 = {}) {
|
|
244872
|
+
let type = options8.entryType || options8.type;
|
|
244873
|
+
if (type === "both")
|
|
244874
|
+
type = EntryTypes.FILE_DIR_TYPE;
|
|
244875
|
+
if (type)
|
|
244876
|
+
options8.type = type;
|
|
244877
|
+
if (!root2) {
|
|
244878
|
+
throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
|
|
244879
|
+
} else if (typeof root2 !== "string") {
|
|
244880
|
+
throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
|
|
244881
|
+
} else if (type && !ALL_TYPES.includes(type)) {
|
|
244882
|
+
throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
|
|
244883
|
+
}
|
|
244884
|
+
options8.root = root2;
|
|
244885
|
+
return new ReaddirpStream(options8);
|
|
244886
|
+
}
|
|
244887
|
+
|
|
244888
|
+
// node_modules/chokidar/handler.js
|
|
244889
|
+
import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
|
|
244890
|
+
import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat3 } from "node:fs/promises";
|
|
244891
|
+
import { type as osType } from "node:os";
|
|
244892
|
+
import * as sp2 from "node:path";
|
|
244893
|
+
var STR_DATA = "data";
|
|
244894
|
+
var STR_END = "end";
|
|
244895
|
+
var STR_CLOSE = "close";
|
|
244896
|
+
var EMPTY_FN = () => {};
|
|
244897
|
+
var pl6 = process.platform;
|
|
244898
|
+
var isWindows4 = pl6 === "win32";
|
|
244899
|
+
var isMacos = pl6 === "darwin";
|
|
244900
|
+
var isLinux = pl6 === "linux";
|
|
244901
|
+
var isFreeBSD = pl6 === "freebsd";
|
|
244902
|
+
var isIBMi = osType() === "OS400";
|
|
244903
|
+
var EVENTS = {
|
|
244904
|
+
ALL: "all",
|
|
244905
|
+
READY: "ready",
|
|
244906
|
+
ADD: "add",
|
|
244907
|
+
CHANGE: "change",
|
|
244908
|
+
ADD_DIR: "addDir",
|
|
244909
|
+
UNLINK: "unlink",
|
|
244910
|
+
UNLINK_DIR: "unlinkDir",
|
|
244911
|
+
RAW: "raw",
|
|
244912
|
+
ERROR: "error"
|
|
244913
|
+
};
|
|
244914
|
+
var EV = EVENTS;
|
|
244915
|
+
var THROTTLE_MODE_WATCH = "watch";
|
|
244916
|
+
var statMethods = { lstat: lstat3, stat: stat3 };
|
|
244917
|
+
var KEY_LISTENERS = "listeners";
|
|
244918
|
+
var KEY_ERR = "errHandlers";
|
|
244919
|
+
var KEY_RAW = "rawEmitters";
|
|
244920
|
+
var HANDLER_KEYS2 = [KEY_LISTENERS, KEY_ERR, KEY_RAW];
|
|
244921
|
+
var binaryExtensions = new Set([
|
|
244922
|
+
"3dm",
|
|
244923
|
+
"3ds",
|
|
244924
|
+
"3g2",
|
|
244925
|
+
"3gp",
|
|
244926
|
+
"7z",
|
|
244927
|
+
"a",
|
|
244928
|
+
"aac",
|
|
244929
|
+
"adp",
|
|
244930
|
+
"afdesign",
|
|
244931
|
+
"afphoto",
|
|
244932
|
+
"afpub",
|
|
244933
|
+
"ai",
|
|
244934
|
+
"aif",
|
|
244935
|
+
"aiff",
|
|
244936
|
+
"alz",
|
|
244937
|
+
"ape",
|
|
244938
|
+
"apk",
|
|
244939
|
+
"appimage",
|
|
244940
|
+
"ar",
|
|
244941
|
+
"arj",
|
|
244942
|
+
"asf",
|
|
244943
|
+
"au",
|
|
244944
|
+
"avi",
|
|
244945
|
+
"bak",
|
|
244946
|
+
"baml",
|
|
244947
|
+
"bh",
|
|
244948
|
+
"bin",
|
|
244949
|
+
"bk",
|
|
244950
|
+
"bmp",
|
|
244951
|
+
"btif",
|
|
244952
|
+
"bz2",
|
|
244953
|
+
"bzip2",
|
|
244954
|
+
"cab",
|
|
244955
|
+
"caf",
|
|
244956
|
+
"cgm",
|
|
244957
|
+
"class",
|
|
244958
|
+
"cmx",
|
|
244959
|
+
"cpio",
|
|
244960
|
+
"cr2",
|
|
244961
|
+
"cur",
|
|
244962
|
+
"dat",
|
|
244963
|
+
"dcm",
|
|
244964
|
+
"deb",
|
|
244965
|
+
"dex",
|
|
244966
|
+
"djvu",
|
|
244967
|
+
"dll",
|
|
244968
|
+
"dmg",
|
|
244969
|
+
"dng",
|
|
244970
|
+
"doc",
|
|
244971
|
+
"docm",
|
|
244972
|
+
"docx",
|
|
244973
|
+
"dot",
|
|
244974
|
+
"dotm",
|
|
244975
|
+
"dra",
|
|
244976
|
+
"DS_Store",
|
|
244977
|
+
"dsk",
|
|
244978
|
+
"dts",
|
|
244979
|
+
"dtshd",
|
|
244980
|
+
"dvb",
|
|
244981
|
+
"dwg",
|
|
244982
|
+
"dxf",
|
|
244983
|
+
"ecelp4800",
|
|
244984
|
+
"ecelp7470",
|
|
244985
|
+
"ecelp9600",
|
|
244986
|
+
"egg",
|
|
244987
|
+
"eol",
|
|
244988
|
+
"eot",
|
|
244989
|
+
"epub",
|
|
244990
|
+
"exe",
|
|
244991
|
+
"f4v",
|
|
244992
|
+
"fbs",
|
|
244993
|
+
"fh",
|
|
244994
|
+
"fla",
|
|
244995
|
+
"flac",
|
|
244996
|
+
"flatpak",
|
|
244997
|
+
"fli",
|
|
244998
|
+
"flv",
|
|
244999
|
+
"fpx",
|
|
245000
|
+
"fst",
|
|
245001
|
+
"fvt",
|
|
245002
|
+
"g3",
|
|
245003
|
+
"gh",
|
|
245004
|
+
"gif",
|
|
245005
|
+
"graffle",
|
|
245006
|
+
"gz",
|
|
245007
|
+
"gzip",
|
|
245008
|
+
"h261",
|
|
245009
|
+
"h263",
|
|
245010
|
+
"h264",
|
|
245011
|
+
"icns",
|
|
245012
|
+
"ico",
|
|
245013
|
+
"ief",
|
|
245014
|
+
"img",
|
|
245015
|
+
"ipa",
|
|
245016
|
+
"iso",
|
|
245017
|
+
"jar",
|
|
245018
|
+
"jpeg",
|
|
245019
|
+
"jpg",
|
|
245020
|
+
"jpgv",
|
|
245021
|
+
"jpm",
|
|
245022
|
+
"jxr",
|
|
245023
|
+
"key",
|
|
245024
|
+
"ktx",
|
|
245025
|
+
"lha",
|
|
245026
|
+
"lib",
|
|
245027
|
+
"lvp",
|
|
245028
|
+
"lz",
|
|
245029
|
+
"lzh",
|
|
245030
|
+
"lzma",
|
|
245031
|
+
"lzo",
|
|
245032
|
+
"m3u",
|
|
245033
|
+
"m4a",
|
|
245034
|
+
"m4v",
|
|
245035
|
+
"mar",
|
|
245036
|
+
"mdi",
|
|
245037
|
+
"mht",
|
|
245038
|
+
"mid",
|
|
245039
|
+
"midi",
|
|
245040
|
+
"mj2",
|
|
245041
|
+
"mka",
|
|
245042
|
+
"mkv",
|
|
245043
|
+
"mmr",
|
|
245044
|
+
"mng",
|
|
245045
|
+
"mobi",
|
|
245046
|
+
"mov",
|
|
245047
|
+
"movie",
|
|
245048
|
+
"mp3",
|
|
245049
|
+
"mp4",
|
|
245050
|
+
"mp4a",
|
|
245051
|
+
"mpeg",
|
|
245052
|
+
"mpg",
|
|
245053
|
+
"mpga",
|
|
245054
|
+
"mxu",
|
|
245055
|
+
"nef",
|
|
245056
|
+
"npx",
|
|
245057
|
+
"numbers",
|
|
245058
|
+
"nupkg",
|
|
245059
|
+
"o",
|
|
245060
|
+
"odp",
|
|
245061
|
+
"ods",
|
|
245062
|
+
"odt",
|
|
245063
|
+
"oga",
|
|
245064
|
+
"ogg",
|
|
245065
|
+
"ogv",
|
|
245066
|
+
"otf",
|
|
245067
|
+
"ott",
|
|
245068
|
+
"pages",
|
|
245069
|
+
"pbm",
|
|
245070
|
+
"pcx",
|
|
245071
|
+
"pdb",
|
|
245072
|
+
"pdf",
|
|
245073
|
+
"pea",
|
|
245074
|
+
"pgm",
|
|
245075
|
+
"pic",
|
|
245076
|
+
"png",
|
|
245077
|
+
"pnm",
|
|
245078
|
+
"pot",
|
|
245079
|
+
"potm",
|
|
245080
|
+
"potx",
|
|
245081
|
+
"ppa",
|
|
245082
|
+
"ppam",
|
|
245083
|
+
"ppm",
|
|
245084
|
+
"pps",
|
|
245085
|
+
"ppsm",
|
|
245086
|
+
"ppsx",
|
|
245087
|
+
"ppt",
|
|
245088
|
+
"pptm",
|
|
245089
|
+
"pptx",
|
|
245090
|
+
"psd",
|
|
245091
|
+
"pya",
|
|
245092
|
+
"pyc",
|
|
245093
|
+
"pyo",
|
|
245094
|
+
"pyv",
|
|
245095
|
+
"qt",
|
|
245096
|
+
"rar",
|
|
245097
|
+
"ras",
|
|
245098
|
+
"raw",
|
|
245099
|
+
"resources",
|
|
245100
|
+
"rgb",
|
|
245101
|
+
"rip",
|
|
245102
|
+
"rlc",
|
|
245103
|
+
"rmf",
|
|
245104
|
+
"rmvb",
|
|
245105
|
+
"rpm",
|
|
245106
|
+
"rtf",
|
|
245107
|
+
"rz",
|
|
245108
|
+
"s3m",
|
|
245109
|
+
"s7z",
|
|
245110
|
+
"scpt",
|
|
245111
|
+
"sgi",
|
|
245112
|
+
"shar",
|
|
245113
|
+
"snap",
|
|
245114
|
+
"sil",
|
|
245115
|
+
"sketch",
|
|
245116
|
+
"slk",
|
|
245117
|
+
"smv",
|
|
245118
|
+
"snk",
|
|
245119
|
+
"so",
|
|
245120
|
+
"stl",
|
|
245121
|
+
"suo",
|
|
245122
|
+
"sub",
|
|
245123
|
+
"swf",
|
|
245124
|
+
"tar",
|
|
245125
|
+
"tbz",
|
|
245126
|
+
"tbz2",
|
|
245127
|
+
"tga",
|
|
245128
|
+
"tgz",
|
|
245129
|
+
"thmx",
|
|
245130
|
+
"tif",
|
|
245131
|
+
"tiff",
|
|
245132
|
+
"tlz",
|
|
245133
|
+
"ttc",
|
|
245134
|
+
"ttf",
|
|
245135
|
+
"txz",
|
|
245136
|
+
"udf",
|
|
245137
|
+
"uvh",
|
|
245138
|
+
"uvi",
|
|
245139
|
+
"uvm",
|
|
245140
|
+
"uvp",
|
|
245141
|
+
"uvs",
|
|
245142
|
+
"uvu",
|
|
245143
|
+
"viv",
|
|
245144
|
+
"vob",
|
|
245145
|
+
"war",
|
|
245146
|
+
"wav",
|
|
245147
|
+
"wax",
|
|
245148
|
+
"wbmp",
|
|
245149
|
+
"wdp",
|
|
245150
|
+
"weba",
|
|
245151
|
+
"webm",
|
|
245152
|
+
"webp",
|
|
245153
|
+
"whl",
|
|
245154
|
+
"wim",
|
|
245155
|
+
"wm",
|
|
245156
|
+
"wma",
|
|
245157
|
+
"wmv",
|
|
245158
|
+
"wmx",
|
|
245159
|
+
"woff",
|
|
245160
|
+
"woff2",
|
|
245161
|
+
"wrm",
|
|
245162
|
+
"wvx",
|
|
245163
|
+
"xbm",
|
|
245164
|
+
"xif",
|
|
245165
|
+
"xla",
|
|
245166
|
+
"xlam",
|
|
245167
|
+
"xls",
|
|
245168
|
+
"xlsb",
|
|
245169
|
+
"xlsm",
|
|
245170
|
+
"xlsx",
|
|
245171
|
+
"xlt",
|
|
245172
|
+
"xltm",
|
|
245173
|
+
"xltx",
|
|
245174
|
+
"xm",
|
|
245175
|
+
"xmind",
|
|
245176
|
+
"xpi",
|
|
245177
|
+
"xpm",
|
|
245178
|
+
"xwd",
|
|
245179
|
+
"xz",
|
|
245180
|
+
"z",
|
|
245181
|
+
"zip",
|
|
245182
|
+
"zipx"
|
|
245183
|
+
]);
|
|
245184
|
+
var isBinaryPath = (filePath) => binaryExtensions.has(sp2.extname(filePath).slice(1).toLowerCase());
|
|
245185
|
+
var foreach = (val, fn9) => {
|
|
245186
|
+
if (val instanceof Set) {
|
|
245187
|
+
val.forEach(fn9);
|
|
245188
|
+
} else {
|
|
245189
|
+
fn9(val);
|
|
245190
|
+
}
|
|
245191
|
+
};
|
|
245192
|
+
var addAndConvert = (main, prop, item) => {
|
|
245193
|
+
let container = main[prop];
|
|
245194
|
+
if (!(container instanceof Set)) {
|
|
245195
|
+
main[prop] = container = new Set([container]);
|
|
245196
|
+
}
|
|
245197
|
+
container.add(item);
|
|
245198
|
+
};
|
|
245199
|
+
var clearItem = (cont) => (key2) => {
|
|
245200
|
+
const set2 = cont[key2];
|
|
245201
|
+
if (set2 instanceof Set) {
|
|
245202
|
+
set2.clear();
|
|
245203
|
+
} else {
|
|
245204
|
+
delete cont[key2];
|
|
245205
|
+
}
|
|
245206
|
+
};
|
|
245207
|
+
var delFromSet = (main, prop, item) => {
|
|
245208
|
+
const container = main[prop];
|
|
245209
|
+
if (container instanceof Set) {
|
|
245210
|
+
container.delete(item);
|
|
245211
|
+
} else if (container === item) {
|
|
245212
|
+
delete main[prop];
|
|
245213
|
+
}
|
|
245214
|
+
};
|
|
245215
|
+
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
245216
|
+
var FsWatchInstances = new Map;
|
|
245217
|
+
function createFsWatchInstance(path19, options8, listener, errHandler, emitRaw) {
|
|
245218
|
+
const handleEvent = (rawEvent, evPath) => {
|
|
245219
|
+
listener(path19);
|
|
245220
|
+
emitRaw(rawEvent, evPath, { watchedPath: path19 });
|
|
245221
|
+
if (evPath && path19 !== evPath) {
|
|
245222
|
+
fsWatchBroadcast(sp2.resolve(path19, evPath), KEY_LISTENERS, sp2.join(path19, evPath));
|
|
245223
|
+
}
|
|
245224
|
+
};
|
|
245225
|
+
try {
|
|
245226
|
+
return fs_watch(path19, {
|
|
245227
|
+
persistent: options8.persistent
|
|
245228
|
+
}, handleEvent);
|
|
245229
|
+
} catch (error48) {
|
|
245230
|
+
errHandler(error48);
|
|
245231
|
+
return;
|
|
245232
|
+
}
|
|
245233
|
+
}
|
|
245234
|
+
var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
|
|
245235
|
+
const cont = FsWatchInstances.get(fullPath);
|
|
245236
|
+
if (!cont)
|
|
245237
|
+
return;
|
|
245238
|
+
foreach(cont[listenerType], (listener) => {
|
|
245239
|
+
listener(val1, val2, val3);
|
|
245240
|
+
});
|
|
245241
|
+
};
|
|
245242
|
+
var setFsWatchListener = (path19, fullPath, options8, handlers) => {
|
|
245243
|
+
const { listener, errHandler, rawEmitter } = handlers;
|
|
245244
|
+
let cont = FsWatchInstances.get(fullPath);
|
|
245245
|
+
let watcher;
|
|
245246
|
+
if (!options8.persistent) {
|
|
245247
|
+
watcher = createFsWatchInstance(path19, options8, listener, errHandler, rawEmitter);
|
|
245248
|
+
if (!watcher)
|
|
245249
|
+
return;
|
|
245250
|
+
return watcher.close.bind(watcher);
|
|
245251
|
+
}
|
|
245252
|
+
if (cont) {
|
|
245253
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
245254
|
+
addAndConvert(cont, KEY_ERR, errHandler);
|
|
245255
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
245256
|
+
} else {
|
|
245257
|
+
watcher = createFsWatchInstance(path19, options8, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
|
|
245258
|
+
if (!watcher)
|
|
245259
|
+
return;
|
|
245260
|
+
watcher.on(EV.ERROR, async (error48) => {
|
|
245261
|
+
const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
|
|
245262
|
+
if (cont)
|
|
245263
|
+
cont.watcherUnusable = true;
|
|
245264
|
+
if (isWindows4 && error48.code === "EPERM") {
|
|
245265
|
+
try {
|
|
245266
|
+
const fd = await open2(path19, "r");
|
|
245267
|
+
await fd.close();
|
|
245268
|
+
broadcastErr(error48);
|
|
245269
|
+
} catch (err) {}
|
|
245270
|
+
} else {
|
|
245271
|
+
broadcastErr(error48);
|
|
245272
|
+
}
|
|
245273
|
+
});
|
|
245274
|
+
cont = {
|
|
245275
|
+
listeners: listener,
|
|
245276
|
+
errHandlers: errHandler,
|
|
245277
|
+
rawEmitters: rawEmitter,
|
|
245278
|
+
watcher
|
|
245279
|
+
};
|
|
245280
|
+
FsWatchInstances.set(fullPath, cont);
|
|
245281
|
+
}
|
|
245282
|
+
return () => {
|
|
245283
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
245284
|
+
delFromSet(cont, KEY_ERR, errHandler);
|
|
245285
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
245286
|
+
if (isEmptySet(cont.listeners)) {
|
|
245287
|
+
cont.watcher.close();
|
|
245288
|
+
FsWatchInstances.delete(fullPath);
|
|
245289
|
+
HANDLER_KEYS2.forEach(clearItem(cont));
|
|
245290
|
+
cont.watcher = undefined;
|
|
245291
|
+
Object.freeze(cont);
|
|
245292
|
+
}
|
|
245293
|
+
};
|
|
245294
|
+
};
|
|
245295
|
+
var FsWatchFileInstances = new Map;
|
|
245296
|
+
var setFsWatchFileListener = (path19, fullPath, options8, handlers) => {
|
|
245297
|
+
const { listener, rawEmitter } = handlers;
|
|
245298
|
+
let cont = FsWatchFileInstances.get(fullPath);
|
|
245299
|
+
const copts = cont && cont.options;
|
|
245300
|
+
if (copts && (copts.persistent < options8.persistent || copts.interval > options8.interval)) {
|
|
245301
|
+
unwatchFile(fullPath);
|
|
245302
|
+
cont = undefined;
|
|
245303
|
+
}
|
|
245304
|
+
if (cont) {
|
|
245305
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
245306
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
245307
|
+
} else {
|
|
245308
|
+
cont = {
|
|
245309
|
+
listeners: listener,
|
|
245310
|
+
rawEmitters: rawEmitter,
|
|
245311
|
+
options: options8,
|
|
245312
|
+
watcher: watchFile(fullPath, options8, (curr, prev) => {
|
|
245313
|
+
foreach(cont.rawEmitters, (rawEmitter2) => {
|
|
245314
|
+
rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
|
|
245315
|
+
});
|
|
245316
|
+
const currmtime = curr.mtimeMs;
|
|
245317
|
+
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
245318
|
+
foreach(cont.listeners, (listener2) => listener2(path19, curr));
|
|
245319
|
+
}
|
|
245320
|
+
})
|
|
245321
|
+
};
|
|
245322
|
+
FsWatchFileInstances.set(fullPath, cont);
|
|
245323
|
+
}
|
|
245324
|
+
return () => {
|
|
245325
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
245326
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
245327
|
+
if (isEmptySet(cont.listeners)) {
|
|
245328
|
+
FsWatchFileInstances.delete(fullPath);
|
|
245329
|
+
unwatchFile(fullPath);
|
|
245330
|
+
cont.options = cont.watcher = undefined;
|
|
245331
|
+
Object.freeze(cont);
|
|
245332
|
+
}
|
|
245333
|
+
};
|
|
245334
|
+
};
|
|
245335
|
+
|
|
245336
|
+
class NodeFsHandler {
|
|
245337
|
+
fsw;
|
|
245338
|
+
_boundHandleError;
|
|
245339
|
+
constructor(fsW) {
|
|
245340
|
+
this.fsw = fsW;
|
|
245341
|
+
this._boundHandleError = (error48) => fsW._handleError(error48);
|
|
245342
|
+
}
|
|
245343
|
+
_watchWithNodeFs(path19, listener) {
|
|
245344
|
+
const opts = this.fsw.options;
|
|
245345
|
+
const directory = sp2.dirname(path19);
|
|
245346
|
+
const basename5 = sp2.basename(path19);
|
|
245347
|
+
const parent = this.fsw._getWatchedDir(directory);
|
|
245348
|
+
parent.add(basename5);
|
|
245349
|
+
const absolutePath = sp2.resolve(path19);
|
|
245350
|
+
const options8 = {
|
|
245351
|
+
persistent: opts.persistent
|
|
245352
|
+
};
|
|
245353
|
+
if (!listener)
|
|
245354
|
+
listener = EMPTY_FN;
|
|
245355
|
+
let closer;
|
|
245356
|
+
if (opts.usePolling) {
|
|
245357
|
+
const enableBin = opts.interval !== opts.binaryInterval;
|
|
245358
|
+
options8.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
|
|
245359
|
+
closer = setFsWatchFileListener(path19, absolutePath, options8, {
|
|
245360
|
+
listener,
|
|
245361
|
+
rawEmitter: this.fsw._emitRaw
|
|
245362
|
+
});
|
|
245363
|
+
} else {
|
|
245364
|
+
closer = setFsWatchListener(path19, absolutePath, options8, {
|
|
245365
|
+
listener,
|
|
245366
|
+
errHandler: this._boundHandleError,
|
|
245367
|
+
rawEmitter: this.fsw._emitRaw
|
|
245368
|
+
});
|
|
245369
|
+
}
|
|
245370
|
+
return closer;
|
|
245371
|
+
}
|
|
245372
|
+
_handleFile(file2, stats, initialAdd) {
|
|
245373
|
+
if (this.fsw.closed) {
|
|
245374
|
+
return;
|
|
245375
|
+
}
|
|
245376
|
+
const dirname14 = sp2.dirname(file2);
|
|
245377
|
+
const basename5 = sp2.basename(file2);
|
|
245378
|
+
const parent = this.fsw._getWatchedDir(dirname14);
|
|
245379
|
+
let prevStats = stats;
|
|
245380
|
+
if (parent.has(basename5))
|
|
245381
|
+
return;
|
|
245382
|
+
const listener = async (path19, newStats) => {
|
|
245383
|
+
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
|
|
245384
|
+
return;
|
|
245385
|
+
if (!newStats || newStats.mtimeMs === 0) {
|
|
245386
|
+
try {
|
|
245387
|
+
const newStats2 = await stat3(file2);
|
|
245388
|
+
if (this.fsw.closed)
|
|
245389
|
+
return;
|
|
245390
|
+
const at13 = newStats2.atimeMs;
|
|
245391
|
+
const mt12 = newStats2.mtimeMs;
|
|
245392
|
+
if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
|
|
245393
|
+
this.fsw._emit(EV.CHANGE, file2, newStats2);
|
|
245394
|
+
}
|
|
245395
|
+
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
|
|
245396
|
+
this.fsw._closeFile(path19);
|
|
245397
|
+
prevStats = newStats2;
|
|
245398
|
+
const closer2 = this._watchWithNodeFs(file2, listener);
|
|
245399
|
+
if (closer2)
|
|
245400
|
+
this.fsw._addPathCloser(path19, closer2);
|
|
245401
|
+
} else {
|
|
245402
|
+
prevStats = newStats2;
|
|
245403
|
+
}
|
|
245404
|
+
} catch (error48) {
|
|
245405
|
+
this.fsw._remove(dirname14, basename5);
|
|
245406
|
+
}
|
|
245407
|
+
} else if (parent.has(basename5)) {
|
|
245408
|
+
const at13 = newStats.atimeMs;
|
|
245409
|
+
const mt12 = newStats.mtimeMs;
|
|
245410
|
+
if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
|
|
245411
|
+
this.fsw._emit(EV.CHANGE, file2, newStats);
|
|
245412
|
+
}
|
|
245413
|
+
prevStats = newStats;
|
|
245414
|
+
}
|
|
245415
|
+
};
|
|
245416
|
+
const closer = this._watchWithNodeFs(file2, listener);
|
|
245417
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file2)) {
|
|
245418
|
+
if (!this.fsw._throttle(EV.ADD, file2, 0))
|
|
245419
|
+
return;
|
|
245420
|
+
this.fsw._emit(EV.ADD, file2, stats);
|
|
245421
|
+
}
|
|
245422
|
+
return closer;
|
|
245423
|
+
}
|
|
245424
|
+
async _handleSymlink(entry, directory, path19, item) {
|
|
245425
|
+
if (this.fsw.closed) {
|
|
245426
|
+
return;
|
|
245427
|
+
}
|
|
245428
|
+
const full = entry.fullPath;
|
|
245429
|
+
const dir = this.fsw._getWatchedDir(directory);
|
|
245430
|
+
if (!this.fsw.options.followSymlinks) {
|
|
245431
|
+
this.fsw._incrReadyCount();
|
|
245432
|
+
let linkPath;
|
|
245433
|
+
try {
|
|
245434
|
+
linkPath = await fsrealpath(path19);
|
|
245435
|
+
} catch (e8) {
|
|
245436
|
+
this.fsw._emitReady();
|
|
245437
|
+
return true;
|
|
245438
|
+
}
|
|
245439
|
+
if (this.fsw.closed)
|
|
245440
|
+
return;
|
|
245441
|
+
if (dir.has(item)) {
|
|
245442
|
+
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
245443
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
245444
|
+
this.fsw._emit(EV.CHANGE, path19, entry.stats);
|
|
245445
|
+
}
|
|
245446
|
+
} else {
|
|
245447
|
+
dir.add(item);
|
|
245448
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
245449
|
+
this.fsw._emit(EV.ADD, path19, entry.stats);
|
|
245450
|
+
}
|
|
245451
|
+
this.fsw._emitReady();
|
|
245452
|
+
return true;
|
|
245453
|
+
}
|
|
245454
|
+
if (this.fsw._symlinkPaths.has(full)) {
|
|
245455
|
+
return true;
|
|
245456
|
+
}
|
|
245457
|
+
this.fsw._symlinkPaths.set(full, true);
|
|
245458
|
+
}
|
|
245459
|
+
_handleRead(directory, initialAdd, wh2, target, dir, depth, throttler) {
|
|
245460
|
+
directory = sp2.join(directory, "");
|
|
245461
|
+
const throttleKey = target ? `${directory}:${target}` : directory;
|
|
245462
|
+
throttler = this.fsw._throttle("readdir", throttleKey, 1000);
|
|
245463
|
+
if (!throttler)
|
|
245464
|
+
return;
|
|
245465
|
+
const previous = this.fsw._getWatchedDir(wh2.path);
|
|
245466
|
+
const current = new Set;
|
|
245467
|
+
let stream = this.fsw._readdirp(directory, {
|
|
245468
|
+
fileFilter: (entry) => wh2.filterPath(entry),
|
|
245469
|
+
directoryFilter: (entry) => wh2.filterDir(entry)
|
|
245470
|
+
});
|
|
245471
|
+
if (!stream)
|
|
245472
|
+
return;
|
|
245473
|
+
stream.on(STR_DATA, async (entry) => {
|
|
245474
|
+
if (this.fsw.closed) {
|
|
245475
|
+
stream = undefined;
|
|
245476
|
+
return;
|
|
245477
|
+
}
|
|
245478
|
+
const item = entry.path;
|
|
245479
|
+
let path19 = sp2.join(directory, item);
|
|
245480
|
+
current.add(item);
|
|
245481
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path19, item)) {
|
|
245482
|
+
return;
|
|
245483
|
+
}
|
|
245484
|
+
if (this.fsw.closed) {
|
|
245485
|
+
stream = undefined;
|
|
245486
|
+
return;
|
|
245487
|
+
}
|
|
245488
|
+
if (item === target || !target && !previous.has(item)) {
|
|
245489
|
+
this.fsw._incrReadyCount();
|
|
245490
|
+
path19 = sp2.join(dir, sp2.relative(dir, path19));
|
|
245491
|
+
this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
|
|
245492
|
+
}
|
|
245493
|
+
}).on(EV.ERROR, this._boundHandleError);
|
|
245494
|
+
return new Promise((resolve7, reject) => {
|
|
245495
|
+
if (!stream)
|
|
245496
|
+
return reject();
|
|
245497
|
+
stream.once(STR_END, () => {
|
|
245498
|
+
if (this.fsw.closed) {
|
|
245499
|
+
stream = undefined;
|
|
245500
|
+
return;
|
|
245501
|
+
}
|
|
245502
|
+
const wasThrottled = throttler ? throttler.clear() : false;
|
|
245503
|
+
resolve7(undefined);
|
|
245504
|
+
previous.getChildren().filter((item) => {
|
|
245505
|
+
return item !== directory && !current.has(item);
|
|
245506
|
+
}).forEach((item) => {
|
|
245507
|
+
this.fsw._remove(directory, item);
|
|
245508
|
+
});
|
|
245509
|
+
stream = undefined;
|
|
245510
|
+
if (wasThrottled)
|
|
245511
|
+
this._handleRead(directory, false, wh2, target, dir, depth, throttler);
|
|
245512
|
+
});
|
|
245513
|
+
});
|
|
245514
|
+
}
|
|
245515
|
+
async _handleDir(dir, stats, initialAdd, depth, target, wh2, realpath2) {
|
|
245516
|
+
const parentDir = this.fsw._getWatchedDir(sp2.dirname(dir));
|
|
245517
|
+
const tracked = parentDir.has(sp2.basename(dir));
|
|
245518
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
|
|
245519
|
+
this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
245520
|
+
}
|
|
245521
|
+
parentDir.add(sp2.basename(dir));
|
|
245522
|
+
this.fsw._getWatchedDir(dir);
|
|
245523
|
+
let throttler;
|
|
245524
|
+
let closer;
|
|
245525
|
+
const oDepth = this.fsw.options.depth;
|
|
245526
|
+
if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
|
|
245527
|
+
if (!target) {
|
|
245528
|
+
await this._handleRead(dir, initialAdd, wh2, target, dir, depth, throttler);
|
|
245529
|
+
if (this.fsw.closed)
|
|
245530
|
+
return;
|
|
245531
|
+
}
|
|
245532
|
+
closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
|
|
245533
|
+
if (stats2 && stats2.mtimeMs === 0)
|
|
245534
|
+
return;
|
|
245535
|
+
this._handleRead(dirPath, false, wh2, target, dir, depth, throttler);
|
|
245536
|
+
});
|
|
245537
|
+
}
|
|
245538
|
+
return closer;
|
|
245539
|
+
}
|
|
245540
|
+
async _addToNodeFs(path19, initialAdd, priorWh, depth, target) {
|
|
245541
|
+
const ready = this.fsw._emitReady;
|
|
245542
|
+
if (this.fsw._isIgnored(path19) || this.fsw.closed) {
|
|
245543
|
+
ready();
|
|
245544
|
+
return false;
|
|
245545
|
+
}
|
|
245546
|
+
const wh2 = this.fsw._getWatchHelpers(path19);
|
|
245547
|
+
if (priorWh) {
|
|
245548
|
+
wh2.filterPath = (entry) => priorWh.filterPath(entry);
|
|
245549
|
+
wh2.filterDir = (entry) => priorWh.filterDir(entry);
|
|
245550
|
+
}
|
|
245551
|
+
try {
|
|
245552
|
+
const stats = await statMethods[wh2.statMethod](wh2.watchPath);
|
|
245553
|
+
if (this.fsw.closed)
|
|
245554
|
+
return;
|
|
245555
|
+
if (this.fsw._isIgnored(wh2.watchPath, stats)) {
|
|
245556
|
+
ready();
|
|
245557
|
+
return false;
|
|
245558
|
+
}
|
|
245559
|
+
const follow = this.fsw.options.followSymlinks;
|
|
245560
|
+
let closer;
|
|
245561
|
+
if (stats.isDirectory()) {
|
|
245562
|
+
const absPath = sp2.resolve(path19);
|
|
245563
|
+
const targetPath = follow ? await fsrealpath(path19) : path19;
|
|
245564
|
+
if (this.fsw.closed)
|
|
245565
|
+
return;
|
|
245566
|
+
closer = await this._handleDir(wh2.watchPath, stats, initialAdd, depth, target, wh2, targetPath);
|
|
245567
|
+
if (this.fsw.closed)
|
|
245568
|
+
return;
|
|
245569
|
+
if (absPath !== targetPath && targetPath !== undefined) {
|
|
245570
|
+
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
245571
|
+
}
|
|
245572
|
+
} else if (stats.isSymbolicLink()) {
|
|
245573
|
+
const targetPath = follow ? await fsrealpath(path19) : path19;
|
|
245574
|
+
if (this.fsw.closed)
|
|
245575
|
+
return;
|
|
245576
|
+
const parent = sp2.dirname(wh2.watchPath);
|
|
245577
|
+
this.fsw._getWatchedDir(parent).add(wh2.watchPath);
|
|
245578
|
+
this.fsw._emit(EV.ADD, wh2.watchPath, stats);
|
|
245579
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path19, wh2, targetPath);
|
|
245580
|
+
if (this.fsw.closed)
|
|
245581
|
+
return;
|
|
245582
|
+
if (targetPath !== undefined) {
|
|
245583
|
+
this.fsw._symlinkPaths.set(sp2.resolve(path19), targetPath);
|
|
245584
|
+
}
|
|
245585
|
+
} else {
|
|
245586
|
+
closer = this._handleFile(wh2.watchPath, stats, initialAdd);
|
|
245587
|
+
}
|
|
245588
|
+
ready();
|
|
245589
|
+
if (closer)
|
|
245590
|
+
this.fsw._addPathCloser(path19, closer);
|
|
245591
|
+
return false;
|
|
245592
|
+
} catch (error48) {
|
|
245593
|
+
if (this.fsw._handleError(error48)) {
|
|
245594
|
+
ready();
|
|
245595
|
+
return path19;
|
|
245596
|
+
}
|
|
245597
|
+
}
|
|
245598
|
+
}
|
|
245599
|
+
}
|
|
245600
|
+
|
|
245601
|
+
// node_modules/chokidar/index.js
|
|
245602
|
+
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
245603
|
+
var SLASH = "/";
|
|
245604
|
+
var SLASH_SLASH = "//";
|
|
245605
|
+
var ONE_DOT = ".";
|
|
245606
|
+
var TWO_DOTS = "..";
|
|
245607
|
+
var STRING_TYPE = "string";
|
|
245608
|
+
var BACK_SLASH_RE = /\\/g;
|
|
245609
|
+
var DOUBLE_SLASH_RE = /\/\//g;
|
|
245610
|
+
var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
245611
|
+
var REPLACER_RE = /^\.[/\\]/;
|
|
245612
|
+
function arrify(item) {
|
|
245613
|
+
return Array.isArray(item) ? item : [item];
|
|
245614
|
+
}
|
|
245615
|
+
var isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
|
|
245616
|
+
function createPattern(matcher) {
|
|
245617
|
+
if (typeof matcher === "function")
|
|
245618
|
+
return matcher;
|
|
245619
|
+
if (typeof matcher === "string")
|
|
245620
|
+
return (string4) => matcher === string4;
|
|
245621
|
+
if (matcher instanceof RegExp)
|
|
245622
|
+
return (string4) => matcher.test(string4);
|
|
245623
|
+
if (typeof matcher === "object" && matcher !== null) {
|
|
245624
|
+
return (string4) => {
|
|
245625
|
+
if (matcher.path === string4)
|
|
245626
|
+
return true;
|
|
245627
|
+
if (matcher.recursive) {
|
|
245628
|
+
const relative6 = sp3.relative(matcher.path, string4);
|
|
245629
|
+
if (!relative6) {
|
|
245630
|
+
return false;
|
|
245631
|
+
}
|
|
245632
|
+
return !relative6.startsWith("..") && !sp3.isAbsolute(relative6);
|
|
245633
|
+
}
|
|
245634
|
+
return false;
|
|
245635
|
+
};
|
|
245636
|
+
}
|
|
245637
|
+
return () => false;
|
|
245638
|
+
}
|
|
245639
|
+
function normalizePath(path19) {
|
|
245640
|
+
if (typeof path19 !== "string")
|
|
245641
|
+
throw new Error("string expected");
|
|
245642
|
+
path19 = sp3.normalize(path19);
|
|
245643
|
+
path19 = path19.replace(/\\/g, "/");
|
|
245644
|
+
let prepend = false;
|
|
245645
|
+
if (path19.startsWith("//"))
|
|
245646
|
+
prepend = true;
|
|
245647
|
+
path19 = path19.replace(DOUBLE_SLASH_RE, "/");
|
|
245648
|
+
if (prepend)
|
|
245649
|
+
path19 = "/" + path19;
|
|
245650
|
+
return path19;
|
|
245651
|
+
}
|
|
245652
|
+
function matchPatterns(patterns, testString, stats) {
|
|
245653
|
+
const path19 = normalizePath(testString);
|
|
245654
|
+
for (let index = 0;index < patterns.length; index++) {
|
|
245655
|
+
const pattern = patterns[index];
|
|
245656
|
+
if (pattern(path19, stats)) {
|
|
245657
|
+
return true;
|
|
245658
|
+
}
|
|
245659
|
+
}
|
|
245660
|
+
return false;
|
|
245661
|
+
}
|
|
245662
|
+
function anymatch(matchers, testString) {
|
|
245663
|
+
if (matchers == null) {
|
|
245664
|
+
throw new TypeError("anymatch: specify first argument");
|
|
245665
|
+
}
|
|
245666
|
+
const matchersArray = arrify(matchers);
|
|
245667
|
+
const patterns = matchersArray.map((matcher) => createPattern(matcher));
|
|
245668
|
+
if (testString == null) {
|
|
245669
|
+
return (testString2, stats) => {
|
|
245670
|
+
return matchPatterns(patterns, testString2, stats);
|
|
245671
|
+
};
|
|
245672
|
+
}
|
|
245673
|
+
return matchPatterns(patterns, testString);
|
|
245674
|
+
}
|
|
245675
|
+
var unifyPaths = (paths_) => {
|
|
245676
|
+
const paths = arrify(paths_).flat();
|
|
245677
|
+
if (!paths.every((p4) => typeof p4 === STRING_TYPE)) {
|
|
245678
|
+
throw new TypeError(`Non-string provided as watch path: ${paths}`);
|
|
245679
|
+
}
|
|
245680
|
+
return paths.map(normalizePathToUnix);
|
|
245681
|
+
};
|
|
245682
|
+
var toUnix = (string4) => {
|
|
245683
|
+
let str = string4.replace(BACK_SLASH_RE, SLASH);
|
|
245684
|
+
let prepend = false;
|
|
245685
|
+
if (str.startsWith(SLASH_SLASH)) {
|
|
245686
|
+
prepend = true;
|
|
245687
|
+
}
|
|
245688
|
+
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
245689
|
+
if (prepend) {
|
|
245690
|
+
str = SLASH + str;
|
|
245691
|
+
}
|
|
245692
|
+
return str;
|
|
245693
|
+
};
|
|
245694
|
+
var normalizePathToUnix = (path19) => toUnix(sp3.normalize(toUnix(path19)));
|
|
245695
|
+
var normalizeIgnored = (cwd = "") => (path19) => {
|
|
245696
|
+
if (typeof path19 === "string") {
|
|
245697
|
+
return normalizePathToUnix(sp3.isAbsolute(path19) ? path19 : sp3.join(cwd, path19));
|
|
245698
|
+
} else {
|
|
245699
|
+
return path19;
|
|
245700
|
+
}
|
|
245701
|
+
};
|
|
245702
|
+
var getAbsolutePath = (path19, cwd) => {
|
|
245703
|
+
if (sp3.isAbsolute(path19)) {
|
|
245704
|
+
return path19;
|
|
245705
|
+
}
|
|
245706
|
+
return sp3.join(cwd, path19);
|
|
245707
|
+
};
|
|
245708
|
+
var EMPTY_SET = Object.freeze(new Set);
|
|
245709
|
+
|
|
245710
|
+
class DirEntry {
|
|
245711
|
+
path;
|
|
245712
|
+
_removeWatcher;
|
|
245713
|
+
items;
|
|
245714
|
+
constructor(dir, removeWatcher) {
|
|
245715
|
+
this.path = dir;
|
|
245716
|
+
this._removeWatcher = removeWatcher;
|
|
245717
|
+
this.items = new Set;
|
|
245718
|
+
}
|
|
245719
|
+
add(item) {
|
|
245720
|
+
const { items } = this;
|
|
245721
|
+
if (!items)
|
|
245722
|
+
return;
|
|
245723
|
+
if (item !== ONE_DOT && item !== TWO_DOTS)
|
|
245724
|
+
items.add(item);
|
|
245725
|
+
}
|
|
245726
|
+
async remove(item) {
|
|
245727
|
+
const { items } = this;
|
|
245728
|
+
if (!items)
|
|
245729
|
+
return;
|
|
245730
|
+
items.delete(item);
|
|
245731
|
+
if (items.size > 0)
|
|
245732
|
+
return;
|
|
245733
|
+
const dir = this.path;
|
|
245734
|
+
try {
|
|
245735
|
+
await readdir3(dir);
|
|
245736
|
+
} catch (err) {
|
|
245737
|
+
if (this._removeWatcher) {
|
|
245738
|
+
this._removeWatcher(sp3.dirname(dir), sp3.basename(dir));
|
|
245739
|
+
}
|
|
245740
|
+
}
|
|
245741
|
+
}
|
|
245742
|
+
has(item) {
|
|
245743
|
+
const { items } = this;
|
|
245744
|
+
if (!items)
|
|
245745
|
+
return;
|
|
245746
|
+
return items.has(item);
|
|
245747
|
+
}
|
|
245748
|
+
getChildren() {
|
|
245749
|
+
const { items } = this;
|
|
245750
|
+
if (!items)
|
|
245751
|
+
return [];
|
|
245752
|
+
return [...items.values()];
|
|
245753
|
+
}
|
|
245754
|
+
dispose() {
|
|
245755
|
+
this.items.clear();
|
|
245756
|
+
this.path = "";
|
|
245757
|
+
this._removeWatcher = EMPTY_FN;
|
|
245758
|
+
this.items = EMPTY_SET;
|
|
245759
|
+
Object.freeze(this);
|
|
245760
|
+
}
|
|
245761
|
+
}
|
|
245762
|
+
var STAT_METHOD_F = "stat";
|
|
245763
|
+
var STAT_METHOD_L = "lstat";
|
|
245764
|
+
|
|
245765
|
+
class WatchHelper {
|
|
245766
|
+
fsw;
|
|
245767
|
+
path;
|
|
245768
|
+
watchPath;
|
|
245769
|
+
fullWatchPath;
|
|
245770
|
+
dirParts;
|
|
245771
|
+
followSymlinks;
|
|
245772
|
+
statMethod;
|
|
245773
|
+
constructor(path19, follow, fsw) {
|
|
245774
|
+
this.fsw = fsw;
|
|
245775
|
+
const watchPath = path19;
|
|
245776
|
+
this.path = path19 = path19.replace(REPLACER_RE, "");
|
|
245777
|
+
this.watchPath = watchPath;
|
|
245778
|
+
this.fullWatchPath = sp3.resolve(watchPath);
|
|
245779
|
+
this.dirParts = [];
|
|
245780
|
+
this.dirParts.forEach((parts) => {
|
|
245781
|
+
if (parts.length > 1)
|
|
245782
|
+
parts.pop();
|
|
245783
|
+
});
|
|
245784
|
+
this.followSymlinks = follow;
|
|
245785
|
+
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
245786
|
+
}
|
|
245787
|
+
entryPath(entry) {
|
|
245788
|
+
return sp3.join(this.watchPath, sp3.relative(this.watchPath, entry.fullPath));
|
|
245789
|
+
}
|
|
245790
|
+
filterPath(entry) {
|
|
245791
|
+
const { stats } = entry;
|
|
245792
|
+
if (stats && stats.isSymbolicLink())
|
|
245793
|
+
return this.filterDir(entry);
|
|
245794
|
+
const resolvedPath = this.entryPath(entry);
|
|
245795
|
+
return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
245796
|
+
}
|
|
245797
|
+
filterDir(entry) {
|
|
245798
|
+
return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
|
|
245799
|
+
}
|
|
245800
|
+
}
|
|
245801
|
+
|
|
245802
|
+
class FSWatcher extends EventEmitter3 {
|
|
245803
|
+
closed;
|
|
245804
|
+
options;
|
|
245805
|
+
_closers;
|
|
245806
|
+
_ignoredPaths;
|
|
245807
|
+
_throttled;
|
|
245808
|
+
_streams;
|
|
245809
|
+
_symlinkPaths;
|
|
245810
|
+
_watched;
|
|
245811
|
+
_pendingWrites;
|
|
245812
|
+
_pendingUnlinks;
|
|
245813
|
+
_readyCount;
|
|
245814
|
+
_emitReady;
|
|
245815
|
+
_closePromise;
|
|
245816
|
+
_userIgnored;
|
|
245817
|
+
_readyEmitted;
|
|
245818
|
+
_emitRaw;
|
|
245819
|
+
_boundRemove;
|
|
245820
|
+
_nodeFsHandler;
|
|
245821
|
+
constructor(_opts = {}) {
|
|
245822
|
+
super();
|
|
245823
|
+
this.closed = false;
|
|
245824
|
+
this._closers = new Map;
|
|
245825
|
+
this._ignoredPaths = new Set;
|
|
245826
|
+
this._throttled = new Map;
|
|
245827
|
+
this._streams = new Set;
|
|
245828
|
+
this._symlinkPaths = new Map;
|
|
245829
|
+
this._watched = new Map;
|
|
245830
|
+
this._pendingWrites = new Map;
|
|
245831
|
+
this._pendingUnlinks = new Map;
|
|
245832
|
+
this._readyCount = 0;
|
|
245833
|
+
this._readyEmitted = false;
|
|
245834
|
+
const awf = _opts.awaitWriteFinish;
|
|
245835
|
+
const DEF_AWF = { stabilityThreshold: 2000, pollInterval: 100 };
|
|
245836
|
+
const opts = {
|
|
245837
|
+
persistent: true,
|
|
245838
|
+
ignoreInitial: false,
|
|
245839
|
+
ignorePermissionErrors: false,
|
|
245840
|
+
interval: 100,
|
|
245841
|
+
binaryInterval: 300,
|
|
245842
|
+
followSymlinks: true,
|
|
245843
|
+
usePolling: false,
|
|
245844
|
+
atomic: true,
|
|
245845
|
+
..._opts,
|
|
245846
|
+
ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
|
|
245847
|
+
awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? { ...DEF_AWF, ...awf } : false
|
|
245848
|
+
};
|
|
245849
|
+
if (isIBMi)
|
|
245850
|
+
opts.usePolling = true;
|
|
245851
|
+
if (opts.atomic === undefined)
|
|
245852
|
+
opts.atomic = !opts.usePolling;
|
|
245853
|
+
const envPoll = process.env.CHOKIDAR_USEPOLLING;
|
|
245854
|
+
if (envPoll !== undefined) {
|
|
245855
|
+
const envLower = envPoll.toLowerCase();
|
|
245856
|
+
if (envLower === "false" || envLower === "0")
|
|
245857
|
+
opts.usePolling = false;
|
|
245858
|
+
else if (envLower === "true" || envLower === "1")
|
|
245859
|
+
opts.usePolling = true;
|
|
245860
|
+
else
|
|
245861
|
+
opts.usePolling = !!envLower;
|
|
245862
|
+
}
|
|
245863
|
+
const envInterval = process.env.CHOKIDAR_INTERVAL;
|
|
245864
|
+
if (envInterval)
|
|
245865
|
+
opts.interval = Number.parseInt(envInterval, 10);
|
|
245866
|
+
let readyCalls = 0;
|
|
245867
|
+
this._emitReady = () => {
|
|
245868
|
+
readyCalls++;
|
|
245869
|
+
if (readyCalls >= this._readyCount) {
|
|
245870
|
+
this._emitReady = EMPTY_FN;
|
|
245871
|
+
this._readyEmitted = true;
|
|
245872
|
+
process.nextTick(() => this.emit(EVENTS.READY));
|
|
245873
|
+
}
|
|
245874
|
+
};
|
|
245875
|
+
this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
|
|
245876
|
+
this._boundRemove = this._remove.bind(this);
|
|
245877
|
+
this.options = opts;
|
|
245878
|
+
this._nodeFsHandler = new NodeFsHandler(this);
|
|
245879
|
+
Object.freeze(opts);
|
|
245880
|
+
}
|
|
245881
|
+
_addIgnoredPath(matcher) {
|
|
245882
|
+
if (isMatcherObject(matcher)) {
|
|
245883
|
+
for (const ignored of this._ignoredPaths) {
|
|
245884
|
+
if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
|
|
245885
|
+
return;
|
|
245886
|
+
}
|
|
245887
|
+
}
|
|
245888
|
+
}
|
|
245889
|
+
this._ignoredPaths.add(matcher);
|
|
245890
|
+
}
|
|
245891
|
+
_removeIgnoredPath(matcher) {
|
|
245892
|
+
this._ignoredPaths.delete(matcher);
|
|
245893
|
+
if (typeof matcher === "string") {
|
|
245894
|
+
for (const ignored of this._ignoredPaths) {
|
|
245895
|
+
if (isMatcherObject(ignored) && ignored.path === matcher) {
|
|
245896
|
+
this._ignoredPaths.delete(ignored);
|
|
245897
|
+
}
|
|
245898
|
+
}
|
|
245899
|
+
}
|
|
245900
|
+
}
|
|
245901
|
+
add(paths_, _origAdd, _internal) {
|
|
245902
|
+
const { cwd } = this.options;
|
|
245903
|
+
this.closed = false;
|
|
245904
|
+
this._closePromise = undefined;
|
|
245905
|
+
let paths = unifyPaths(paths_);
|
|
245906
|
+
if (cwd) {
|
|
245907
|
+
paths = paths.map((path19) => {
|
|
245908
|
+
const absPath = getAbsolutePath(path19, cwd);
|
|
245909
|
+
return absPath;
|
|
245910
|
+
});
|
|
245911
|
+
}
|
|
245912
|
+
paths.forEach((path19) => {
|
|
245913
|
+
this._removeIgnoredPath(path19);
|
|
245914
|
+
});
|
|
245915
|
+
this._userIgnored = undefined;
|
|
245916
|
+
if (!this._readyCount)
|
|
245917
|
+
this._readyCount = 0;
|
|
245918
|
+
this._readyCount += paths.length;
|
|
245919
|
+
Promise.all(paths.map(async (path19) => {
|
|
245920
|
+
const res = await this._nodeFsHandler._addToNodeFs(path19, !_internal, undefined, 0, _origAdd);
|
|
245921
|
+
if (res)
|
|
245922
|
+
this._emitReady();
|
|
245923
|
+
return res;
|
|
245924
|
+
})).then((results) => {
|
|
245925
|
+
if (this.closed)
|
|
245926
|
+
return;
|
|
245927
|
+
results.forEach((item) => {
|
|
245928
|
+
if (item)
|
|
245929
|
+
this.add(sp3.dirname(item), sp3.basename(_origAdd || item));
|
|
245930
|
+
});
|
|
245931
|
+
});
|
|
245932
|
+
return this;
|
|
245933
|
+
}
|
|
245934
|
+
unwatch(paths_) {
|
|
245935
|
+
if (this.closed)
|
|
245936
|
+
return this;
|
|
245937
|
+
const paths = unifyPaths(paths_);
|
|
245938
|
+
const { cwd } = this.options;
|
|
245939
|
+
paths.forEach((path19) => {
|
|
245940
|
+
if (!sp3.isAbsolute(path19) && !this._closers.has(path19)) {
|
|
245941
|
+
if (cwd)
|
|
245942
|
+
path19 = sp3.join(cwd, path19);
|
|
245943
|
+
path19 = sp3.resolve(path19);
|
|
245944
|
+
}
|
|
245945
|
+
this._closePath(path19);
|
|
245946
|
+
this._addIgnoredPath(path19);
|
|
245947
|
+
if (this._watched.has(path19)) {
|
|
245948
|
+
this._addIgnoredPath({
|
|
245949
|
+
path: path19,
|
|
245950
|
+
recursive: true
|
|
245951
|
+
});
|
|
245952
|
+
}
|
|
245953
|
+
this._userIgnored = undefined;
|
|
245954
|
+
});
|
|
245955
|
+
return this;
|
|
245956
|
+
}
|
|
245957
|
+
close() {
|
|
245958
|
+
if (this._closePromise) {
|
|
245959
|
+
return this._closePromise;
|
|
245960
|
+
}
|
|
245961
|
+
this.closed = true;
|
|
245962
|
+
this.removeAllListeners();
|
|
245963
|
+
const closers = [];
|
|
245964
|
+
this._closers.forEach((closerList) => closerList.forEach((closer) => {
|
|
245965
|
+
const promise2 = closer();
|
|
245966
|
+
if (promise2 instanceof Promise)
|
|
245967
|
+
closers.push(promise2);
|
|
245968
|
+
}));
|
|
245969
|
+
this._streams.forEach((stream) => stream.destroy());
|
|
245970
|
+
this._userIgnored = undefined;
|
|
245971
|
+
this._readyCount = 0;
|
|
245972
|
+
this._readyEmitted = false;
|
|
245973
|
+
this._watched.forEach((dirent) => dirent.dispose());
|
|
245974
|
+
this._closers.clear();
|
|
245975
|
+
this._watched.clear();
|
|
245976
|
+
this._streams.clear();
|
|
245977
|
+
this._symlinkPaths.clear();
|
|
245978
|
+
this._throttled.clear();
|
|
245979
|
+
this._closePromise = closers.length ? Promise.all(closers).then(() => {
|
|
245980
|
+
return;
|
|
245981
|
+
}) : Promise.resolve();
|
|
245982
|
+
return this._closePromise;
|
|
245983
|
+
}
|
|
245984
|
+
getWatched() {
|
|
245985
|
+
const watchList = {};
|
|
245986
|
+
this._watched.forEach((entry, dir) => {
|
|
245987
|
+
const key2 = this.options.cwd ? sp3.relative(this.options.cwd, dir) : dir;
|
|
245988
|
+
const index = key2 || ONE_DOT;
|
|
245989
|
+
watchList[index] = entry.getChildren().sort();
|
|
245990
|
+
});
|
|
245991
|
+
return watchList;
|
|
245992
|
+
}
|
|
245993
|
+
emitWithAll(event, args) {
|
|
245994
|
+
this.emit(event, ...args);
|
|
245995
|
+
if (event !== EVENTS.ERROR)
|
|
245996
|
+
this.emit(EVENTS.ALL, event, ...args);
|
|
245997
|
+
}
|
|
245998
|
+
async _emit(event, path19, stats) {
|
|
245999
|
+
if (this.closed)
|
|
246000
|
+
return;
|
|
246001
|
+
const opts = this.options;
|
|
246002
|
+
if (isWindows4)
|
|
246003
|
+
path19 = sp3.normalize(path19);
|
|
246004
|
+
if (opts.cwd)
|
|
246005
|
+
path19 = sp3.relative(opts.cwd, path19);
|
|
246006
|
+
const args = [path19];
|
|
246007
|
+
if (stats != null)
|
|
246008
|
+
args.push(stats);
|
|
246009
|
+
const awf = opts.awaitWriteFinish;
|
|
246010
|
+
let pw;
|
|
246011
|
+
if (awf && (pw = this._pendingWrites.get(path19))) {
|
|
246012
|
+
pw.lastChange = new Date;
|
|
246013
|
+
return this;
|
|
246014
|
+
}
|
|
246015
|
+
if (opts.atomic) {
|
|
246016
|
+
if (event === EVENTS.UNLINK) {
|
|
246017
|
+
this._pendingUnlinks.set(path19, [event, ...args]);
|
|
246018
|
+
setTimeout(() => {
|
|
246019
|
+
this._pendingUnlinks.forEach((entry, path20) => {
|
|
246020
|
+
this.emit(...entry);
|
|
246021
|
+
this.emit(EVENTS.ALL, ...entry);
|
|
246022
|
+
this._pendingUnlinks.delete(path20);
|
|
246023
|
+
});
|
|
246024
|
+
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
246025
|
+
return this;
|
|
246026
|
+
}
|
|
246027
|
+
if (event === EVENTS.ADD && this._pendingUnlinks.has(path19)) {
|
|
246028
|
+
event = EVENTS.CHANGE;
|
|
246029
|
+
this._pendingUnlinks.delete(path19);
|
|
246030
|
+
}
|
|
246031
|
+
}
|
|
246032
|
+
if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
|
|
246033
|
+
const awfEmit = (err, stats2) => {
|
|
246034
|
+
if (err) {
|
|
246035
|
+
event = EVENTS.ERROR;
|
|
246036
|
+
args[0] = err;
|
|
246037
|
+
this.emitWithAll(event, args);
|
|
246038
|
+
} else if (stats2) {
|
|
246039
|
+
if (args.length > 1) {
|
|
246040
|
+
args[1] = stats2;
|
|
246041
|
+
} else {
|
|
246042
|
+
args.push(stats2);
|
|
246043
|
+
}
|
|
246044
|
+
this.emitWithAll(event, args);
|
|
246045
|
+
}
|
|
246046
|
+
};
|
|
246047
|
+
this._awaitWriteFinish(path19, awf.stabilityThreshold, event, awfEmit);
|
|
246048
|
+
return this;
|
|
246049
|
+
}
|
|
246050
|
+
if (event === EVENTS.CHANGE) {
|
|
246051
|
+
const isThrottled = !this._throttle(EVENTS.CHANGE, path19, 50);
|
|
246052
|
+
if (isThrottled)
|
|
246053
|
+
return this;
|
|
246054
|
+
}
|
|
246055
|
+
if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
246056
|
+
const fullPath = opts.cwd ? sp3.join(opts.cwd, path19) : path19;
|
|
246057
|
+
let stats2;
|
|
246058
|
+
try {
|
|
246059
|
+
stats2 = await stat4(fullPath);
|
|
246060
|
+
} catch (err) {}
|
|
246061
|
+
if (!stats2 || this.closed)
|
|
246062
|
+
return;
|
|
246063
|
+
args.push(stats2);
|
|
246064
|
+
}
|
|
246065
|
+
this.emitWithAll(event, args);
|
|
246066
|
+
return this;
|
|
246067
|
+
}
|
|
246068
|
+
_handleError(error48) {
|
|
246069
|
+
const code2 = error48 && error48.code;
|
|
246070
|
+
if (error48 && code2 !== "ENOENT" && code2 !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code2 !== "EPERM" && code2 !== "EACCES")) {
|
|
246071
|
+
this.emit(EVENTS.ERROR, error48);
|
|
246072
|
+
}
|
|
246073
|
+
return error48 || this.closed;
|
|
246074
|
+
}
|
|
246075
|
+
_throttle(actionType, path19, timeout3) {
|
|
246076
|
+
if (!this._throttled.has(actionType)) {
|
|
246077
|
+
this._throttled.set(actionType, new Map);
|
|
246078
|
+
}
|
|
246079
|
+
const action = this._throttled.get(actionType);
|
|
246080
|
+
if (!action)
|
|
246081
|
+
throw new Error("invalid throttle");
|
|
246082
|
+
const actionPath = action.get(path19);
|
|
246083
|
+
if (actionPath) {
|
|
246084
|
+
actionPath.count++;
|
|
246085
|
+
return false;
|
|
246086
|
+
}
|
|
246087
|
+
let timeoutObject;
|
|
246088
|
+
const clear = () => {
|
|
246089
|
+
const item = action.get(path19);
|
|
246090
|
+
const count2 = item ? item.count : 0;
|
|
246091
|
+
action.delete(path19);
|
|
246092
|
+
clearTimeout(timeoutObject);
|
|
246093
|
+
if (item)
|
|
246094
|
+
clearTimeout(item.timeoutObject);
|
|
246095
|
+
return count2;
|
|
246096
|
+
};
|
|
246097
|
+
timeoutObject = setTimeout(clear, timeout3);
|
|
246098
|
+
const thr = { timeoutObject, clear, count: 0 };
|
|
246099
|
+
action.set(path19, thr);
|
|
246100
|
+
return thr;
|
|
246101
|
+
}
|
|
246102
|
+
_incrReadyCount() {
|
|
246103
|
+
return this._readyCount++;
|
|
246104
|
+
}
|
|
246105
|
+
_awaitWriteFinish(path19, threshold, event, awfEmit) {
|
|
246106
|
+
const awf = this.options.awaitWriteFinish;
|
|
246107
|
+
if (typeof awf !== "object")
|
|
246108
|
+
return;
|
|
246109
|
+
const pollInterval = awf.pollInterval;
|
|
246110
|
+
let timeoutHandler;
|
|
246111
|
+
let fullPath = path19;
|
|
246112
|
+
if (this.options.cwd && !sp3.isAbsolute(path19)) {
|
|
246113
|
+
fullPath = sp3.join(this.options.cwd, path19);
|
|
246114
|
+
}
|
|
246115
|
+
const now = new Date;
|
|
246116
|
+
const writes = this._pendingWrites;
|
|
246117
|
+
function awaitWriteFinishFn(prevStat) {
|
|
246118
|
+
statcb(fullPath, (err, curStat) => {
|
|
246119
|
+
if (err || !writes.has(path19)) {
|
|
246120
|
+
if (err && err.code !== "ENOENT")
|
|
246121
|
+
awfEmit(err);
|
|
246122
|
+
return;
|
|
246123
|
+
}
|
|
246124
|
+
const now2 = Number(new Date);
|
|
246125
|
+
if (prevStat && curStat.size !== prevStat.size) {
|
|
246126
|
+
writes.get(path19).lastChange = now2;
|
|
246127
|
+
}
|
|
246128
|
+
const pw = writes.get(path19);
|
|
246129
|
+
const df3 = now2 - pw.lastChange;
|
|
246130
|
+
if (df3 >= threshold) {
|
|
246131
|
+
writes.delete(path19);
|
|
246132
|
+
awfEmit(undefined, curStat);
|
|
246133
|
+
} else {
|
|
246134
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
|
|
246135
|
+
}
|
|
246136
|
+
});
|
|
246137
|
+
}
|
|
246138
|
+
if (!writes.has(path19)) {
|
|
246139
|
+
writes.set(path19, {
|
|
246140
|
+
lastChange: now,
|
|
246141
|
+
cancelWait: () => {
|
|
246142
|
+
writes.delete(path19);
|
|
246143
|
+
clearTimeout(timeoutHandler);
|
|
246144
|
+
return event;
|
|
246145
|
+
}
|
|
246146
|
+
});
|
|
246147
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
|
|
246148
|
+
}
|
|
246149
|
+
}
|
|
246150
|
+
_isIgnored(path19, stats) {
|
|
246151
|
+
if (this.options.atomic && DOT_RE.test(path19))
|
|
246152
|
+
return true;
|
|
246153
|
+
if (!this._userIgnored) {
|
|
246154
|
+
const { cwd } = this.options;
|
|
246155
|
+
const ign = this.options.ignored;
|
|
246156
|
+
const ignored = (ign || []).map(normalizeIgnored(cwd));
|
|
246157
|
+
const ignoredPaths = [...this._ignoredPaths];
|
|
246158
|
+
const list3 = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
|
|
246159
|
+
this._userIgnored = anymatch(list3, undefined);
|
|
246160
|
+
}
|
|
246161
|
+
return this._userIgnored(path19, stats);
|
|
246162
|
+
}
|
|
246163
|
+
_isntIgnored(path19, stat5) {
|
|
246164
|
+
return !this._isIgnored(path19, stat5);
|
|
246165
|
+
}
|
|
246166
|
+
_getWatchHelpers(path19) {
|
|
246167
|
+
return new WatchHelper(path19, this.options.followSymlinks, this);
|
|
246168
|
+
}
|
|
246169
|
+
_getWatchedDir(directory) {
|
|
246170
|
+
const dir = sp3.resolve(directory);
|
|
246171
|
+
if (!this._watched.has(dir))
|
|
246172
|
+
this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
246173
|
+
return this._watched.get(dir);
|
|
246174
|
+
}
|
|
246175
|
+
_hasReadPermissions(stats) {
|
|
246176
|
+
if (this.options.ignorePermissionErrors)
|
|
246177
|
+
return true;
|
|
246178
|
+
return Boolean(Number(stats.mode) & 256);
|
|
246179
|
+
}
|
|
246180
|
+
_remove(directory, item, isDirectory3) {
|
|
246181
|
+
const path19 = sp3.join(directory, item);
|
|
246182
|
+
const fullPath = sp3.resolve(path19);
|
|
246183
|
+
isDirectory3 = isDirectory3 != null ? isDirectory3 : this._watched.has(path19) || this._watched.has(fullPath);
|
|
246184
|
+
if (!this._throttle("remove", path19, 100))
|
|
246185
|
+
return;
|
|
246186
|
+
if (!isDirectory3 && this._watched.size === 1) {
|
|
246187
|
+
this.add(directory, item, true);
|
|
246188
|
+
}
|
|
246189
|
+
const wp5 = this._getWatchedDir(path19);
|
|
246190
|
+
const nestedDirectoryChildren = wp5.getChildren();
|
|
246191
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path19, nested));
|
|
246192
|
+
const parent = this._getWatchedDir(directory);
|
|
246193
|
+
const wasTracked = parent.has(item);
|
|
246194
|
+
parent.remove(item);
|
|
246195
|
+
if (this._symlinkPaths.has(fullPath)) {
|
|
246196
|
+
this._symlinkPaths.delete(fullPath);
|
|
246197
|
+
}
|
|
246198
|
+
let relPath = path19;
|
|
246199
|
+
if (this.options.cwd)
|
|
246200
|
+
relPath = sp3.relative(this.options.cwd, path19);
|
|
246201
|
+
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
246202
|
+
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
246203
|
+
if (event === EVENTS.ADD)
|
|
246204
|
+
return;
|
|
246205
|
+
}
|
|
246206
|
+
this._watched.delete(path19);
|
|
246207
|
+
this._watched.delete(fullPath);
|
|
246208
|
+
const eventName = isDirectory3 ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
|
|
246209
|
+
if (wasTracked && !this._isIgnored(path19))
|
|
246210
|
+
this._emit(eventName, path19);
|
|
246211
|
+
this._closePath(path19);
|
|
246212
|
+
}
|
|
246213
|
+
_closePath(path19) {
|
|
246214
|
+
this._closeFile(path19);
|
|
246215
|
+
const dir = sp3.dirname(path19);
|
|
246216
|
+
this._getWatchedDir(dir).remove(sp3.basename(path19));
|
|
246217
|
+
}
|
|
246218
|
+
_closeFile(path19) {
|
|
246219
|
+
const closers = this._closers.get(path19);
|
|
246220
|
+
if (!closers)
|
|
246221
|
+
return;
|
|
246222
|
+
closers.forEach((closer) => closer());
|
|
246223
|
+
this._closers.delete(path19);
|
|
246224
|
+
}
|
|
246225
|
+
_addPathCloser(path19, closer) {
|
|
246226
|
+
if (!closer)
|
|
246227
|
+
return;
|
|
246228
|
+
let list3 = this._closers.get(path19);
|
|
246229
|
+
if (!list3) {
|
|
246230
|
+
list3 = [];
|
|
246231
|
+
this._closers.set(path19, list3);
|
|
246232
|
+
}
|
|
246233
|
+
list3.push(closer);
|
|
246234
|
+
}
|
|
246235
|
+
_readdirp(root2, opts) {
|
|
246236
|
+
if (this.closed)
|
|
246237
|
+
return;
|
|
246238
|
+
const options8 = { type: EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 };
|
|
246239
|
+
let stream = readdirp(root2, options8);
|
|
246240
|
+
this._streams.add(stream);
|
|
246241
|
+
stream.once(STR_CLOSE, () => {
|
|
246242
|
+
stream = undefined;
|
|
246243
|
+
});
|
|
246244
|
+
stream.once(STR_END, () => {
|
|
246245
|
+
if (stream) {
|
|
246246
|
+
this._streams.delete(stream);
|
|
246247
|
+
stream = undefined;
|
|
246248
|
+
}
|
|
246249
|
+
});
|
|
246250
|
+
return stream;
|
|
246251
|
+
}
|
|
246252
|
+
}
|
|
246253
|
+
function watch(paths, options8 = {}) {
|
|
246254
|
+
const watcher = new FSWatcher(options8);
|
|
246255
|
+
watcher.add(paths);
|
|
246256
|
+
return watcher;
|
|
246257
|
+
}
|
|
246258
|
+
|
|
246259
|
+
// src/cli/dev/dev-server/watcher.ts
|
|
246260
|
+
var import_debounce = __toESM(require_debounce(), 1);
|
|
246261
|
+
var WATCH_DEBOUNCE_MS = 300;
|
|
246262
|
+
var WATCH_QUEUE_DELAY_MS = 500;
|
|
246263
|
+
|
|
246264
|
+
class WatchBase44 extends EventEmitter4 {
|
|
246265
|
+
itemsToWatch;
|
|
246266
|
+
logger;
|
|
246267
|
+
watchers = [];
|
|
246268
|
+
queueWaitForCreation = [];
|
|
246269
|
+
queueWaitForCreationTimeout = null;
|
|
246270
|
+
constructor(itemsToWatch, logger) {
|
|
246271
|
+
super();
|
|
246272
|
+
this.itemsToWatch = itemsToWatch;
|
|
246273
|
+
this.logger = logger;
|
|
246274
|
+
}
|
|
246275
|
+
async start() {
|
|
246276
|
+
if (this.watchers.length > 0 || this.queueWaitForCreation.length > 0) {
|
|
246277
|
+
return;
|
|
246278
|
+
}
|
|
246279
|
+
for (const item of this.itemsToWatch) {
|
|
246280
|
+
if (await pathExists(item.path)) {
|
|
246281
|
+
this.watchers.push(this.watchTarget(item));
|
|
246282
|
+
} else {
|
|
246283
|
+
this.queueWaitForCreation.push(item);
|
|
246284
|
+
}
|
|
246285
|
+
}
|
|
246286
|
+
this.watchCreationQueue();
|
|
246287
|
+
}
|
|
246288
|
+
async close() {
|
|
246289
|
+
if (this.queueWaitForCreationTimeout) {
|
|
246290
|
+
clearTimeout(this.queueWaitForCreationTimeout);
|
|
246291
|
+
this.queueWaitForCreationTimeout = null;
|
|
246292
|
+
}
|
|
246293
|
+
for (const watcher of this.watchers) {
|
|
246294
|
+
await watcher.close();
|
|
246295
|
+
}
|
|
246296
|
+
this.watchers = [];
|
|
246297
|
+
this.queueWaitForCreation = [];
|
|
246298
|
+
}
|
|
246299
|
+
watchCreationQueue() {
|
|
246300
|
+
if (this.queueWaitForCreationTimeout) {
|
|
246301
|
+
clearTimeout(this.queueWaitForCreationTimeout);
|
|
246302
|
+
}
|
|
246303
|
+
this.queueWaitForCreationTimeout = setTimeout(async () => {
|
|
246304
|
+
const toRemove = [];
|
|
246305
|
+
for (const entry of this.queueWaitForCreation) {
|
|
246306
|
+
if (await pathExists(entry.path)) {
|
|
246307
|
+
this.watchers.push(this.watchTarget(entry));
|
|
246308
|
+
toRemove.push(entry);
|
|
246309
|
+
}
|
|
246310
|
+
}
|
|
246311
|
+
this.queueWaitForCreation = this.queueWaitForCreation.filter((entry) => !toRemove.includes(entry));
|
|
246312
|
+
if (this.queueWaitForCreation.length > 0) {
|
|
246313
|
+
this.watchCreationQueue();
|
|
246314
|
+
} else {
|
|
246315
|
+
this.queueWaitForCreationTimeout = null;
|
|
246316
|
+
}
|
|
246317
|
+
}, WATCH_QUEUE_DELAY_MS);
|
|
246318
|
+
}
|
|
246319
|
+
watchTarget(item) {
|
|
246320
|
+
const handler = import_debounce.default(async (_event, path19) => {
|
|
246321
|
+
this.emit("change", item.name, relative6(item.path, path19));
|
|
246322
|
+
}, WATCH_DEBOUNCE_MS);
|
|
246323
|
+
const watcher = watch(item.path, {
|
|
246324
|
+
ignoreInitial: true
|
|
246325
|
+
});
|
|
246326
|
+
watcher.on("all", handler);
|
|
246327
|
+
watcher.on("unlinkDir", async (deletedPath) => {
|
|
246328
|
+
if (deletedPath !== item.path) {
|
|
246329
|
+
return;
|
|
246330
|
+
}
|
|
246331
|
+
await watcher.close();
|
|
246332
|
+
this.queueWaitForCreation.push(item);
|
|
246333
|
+
this.watchCreationQueue();
|
|
246334
|
+
setTimeout(() => {
|
|
246335
|
+
this.watchers = this.watchers.filter((watcher2) => !watcher2.closed);
|
|
246336
|
+
});
|
|
246337
|
+
});
|
|
246338
|
+
watcher.on("error", (err) => {
|
|
246339
|
+
this.logger.error(`Watch handler failed for ${item.path}`, err instanceof Error ? err : undefined);
|
|
246340
|
+
});
|
|
246341
|
+
return watcher;
|
|
246342
|
+
}
|
|
246343
|
+
}
|
|
246344
|
+
|
|
244257
246345
|
// src/cli/dev/dev-server/main.ts
|
|
244258
246346
|
var DEFAULT_PORT = 4400;
|
|
244259
246347
|
var BASE44_APP_URL = "https://base44.app";
|
|
@@ -244261,7 +246349,7 @@ async function createDevServer(options8) {
|
|
|
244261
246349
|
const { port: userPort } = options8;
|
|
244262
246350
|
const port = userPort ?? await getPorts({ port: DEFAULT_PORT });
|
|
244263
246351
|
const baseUrl = `http://localhost:${port}`;
|
|
244264
|
-
const { functions, entities } = await options8.loadResources();
|
|
246352
|
+
const { functions, entities, project: project2 } = await options8.loadResources();
|
|
244265
246353
|
const app = import_express4.default();
|
|
244266
246354
|
const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
|
|
244267
246355
|
target: BASE44_APP_URL,
|
|
@@ -244281,10 +246369,10 @@ async function createDevServer(options8) {
|
|
|
244281
246369
|
});
|
|
244282
246370
|
const devLogger = createDevLogger();
|
|
244283
246371
|
const functionManager = new FunctionManager(functions, devLogger);
|
|
246372
|
+
const functionRoutes = createFunctionRouter(functionManager, devLogger);
|
|
246373
|
+
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
244284
246374
|
if (functionManager.getFunctionNames().length > 0) {
|
|
244285
246375
|
R2.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
|
|
244286
|
-
const functionRoutes = createFunctionRouter(functionManager, devLogger);
|
|
244287
|
-
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
244288
246376
|
}
|
|
244289
246377
|
const db2 = new Database(entities);
|
|
244290
246378
|
if (db2.getCollectionNames().length > 0) {
|
|
@@ -244303,8 +246391,8 @@ async function createDevServer(options8) {
|
|
|
244303
246391
|
devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
|
|
244304
246392
|
remoteProxy(req, res, next);
|
|
244305
246393
|
});
|
|
244306
|
-
|
|
244307
|
-
const
|
|
246394
|
+
const server = await new Promise((resolve8, reject) => {
|
|
246395
|
+
const s5 = app.listen(port, "127.0.0.1", (err) => {
|
|
244308
246396
|
if (err) {
|
|
244309
246397
|
if ("code" in err && err.code === "EADDRINUSE") {
|
|
244310
246398
|
reject(new Error(`Port ${port} is already in use. Stop the other process and try again.`));
|
|
@@ -244312,24 +246400,48 @@ async function createDevServer(options8) {
|
|
|
244312
246400
|
reject(err);
|
|
244313
246401
|
}
|
|
244314
246402
|
} else {
|
|
244315
|
-
|
|
244316
|
-
emitEntityEvent = (appId, entityName, event) => {
|
|
244317
|
-
broadcastEntityEvent(io6, appId, entityName, event);
|
|
244318
|
-
};
|
|
244319
|
-
const shutdown = () => {
|
|
244320
|
-
io6.close();
|
|
244321
|
-
functionManager.stopAll();
|
|
244322
|
-
server.close();
|
|
244323
|
-
};
|
|
244324
|
-
process.on("SIGINT", shutdown);
|
|
244325
|
-
process.on("SIGTERM", shutdown);
|
|
244326
|
-
resolve6({
|
|
244327
|
-
port,
|
|
244328
|
-
server
|
|
244329
|
-
});
|
|
246403
|
+
resolve8(s5);
|
|
244330
246404
|
}
|
|
244331
246405
|
});
|
|
244332
246406
|
});
|
|
246407
|
+
const io6 = createRealtimeServer(server);
|
|
246408
|
+
emitEntityEvent = (appId, entityName, event) => {
|
|
246409
|
+
broadcastEntityEvent(io6, appId, entityName, event);
|
|
246410
|
+
};
|
|
246411
|
+
const base44ConfigWatcher = new WatchBase44([
|
|
246412
|
+
{
|
|
246413
|
+
name: "functions",
|
|
246414
|
+
path: join18(dirname15(project2.configPath), project2.functionsDir)
|
|
246415
|
+
}
|
|
246416
|
+
], devLogger);
|
|
246417
|
+
base44ConfigWatcher.on("change", async (name2) => {
|
|
246418
|
+
try {
|
|
246419
|
+
if (name2 === "functions") {
|
|
246420
|
+
const { functions: functions2 } = await options8.loadResources();
|
|
246421
|
+
const previousFunctionCount = functionManager.getFunctionNames().length;
|
|
246422
|
+
functionManager.reload(functions2);
|
|
246423
|
+
const names = functionManager.getFunctionNames();
|
|
246424
|
+
if (names.length > 0) {
|
|
246425
|
+
devLogger.log(`Reloaded functions: ${names.sort().join(", ")}`);
|
|
246426
|
+
} else if (previousFunctionCount > 0) {
|
|
246427
|
+
devLogger.log("All functions removed");
|
|
246428
|
+
}
|
|
246429
|
+
}
|
|
246430
|
+
} catch (error48) {
|
|
246431
|
+
const errorMessage = error48 instanceof Error ? error48.message : String(error48);
|
|
246432
|
+
devLogger.error(errorMessage);
|
|
246433
|
+
}
|
|
246434
|
+
});
|
|
246435
|
+
await base44ConfigWatcher.start();
|
|
246436
|
+
const shutdown = () => {
|
|
246437
|
+
base44ConfigWatcher.close();
|
|
246438
|
+
io6.close();
|
|
246439
|
+
functionManager.stopAll();
|
|
246440
|
+
server.close();
|
|
246441
|
+
};
|
|
246442
|
+
process.on("SIGINT", shutdown);
|
|
246443
|
+
process.on("SIGTERM", shutdown);
|
|
246444
|
+
return { port, server };
|
|
244333
246445
|
}
|
|
244334
246446
|
|
|
244335
246447
|
// src/cli/commands/dev.ts
|
|
@@ -244353,8 +246465,8 @@ function getDevCommand(context) {
|
|
|
244353
246465
|
}
|
|
244354
246466
|
|
|
244355
246467
|
// src/cli/commands/project/eject.ts
|
|
244356
|
-
import { resolve as
|
|
244357
|
-
var
|
|
246468
|
+
import { resolve as resolve8 } from "node:path";
|
|
246469
|
+
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
244358
246470
|
async function eject(options8) {
|
|
244359
246471
|
const projects = await listProjects();
|
|
244360
246472
|
const ejectableProjects = projects.filter((p4) => p4.isManagedSourceCode !== false);
|
|
@@ -244392,7 +246504,7 @@ async function eject(options8) {
|
|
|
244392
246504
|
selectedProject = selected;
|
|
244393
246505
|
}
|
|
244394
246506
|
const projectId = selectedProject.id;
|
|
244395
|
-
const suggestedPath = await isDirEmpty() ? `./` : `./${
|
|
246507
|
+
const suggestedPath = await isDirEmpty() ? `./` : `./${import_kebabCase2.default(selectedProject.name)}`;
|
|
244396
246508
|
const selectedPath = options8.path ?? await Ze({
|
|
244397
246509
|
message: "Where should we create your project?",
|
|
244398
246510
|
placeholder: suggestedPath,
|
|
@@ -244402,7 +246514,7 @@ async function eject(options8) {
|
|
|
244402
246514
|
Ne("Operation cancelled.");
|
|
244403
246515
|
throw new CLIExitError(0);
|
|
244404
246516
|
}
|
|
244405
|
-
const resolvedPath =
|
|
246517
|
+
const resolvedPath = resolve8(selectedPath);
|
|
244406
246518
|
await runTask("Downloading your project's code...", async (updateMessage) => {
|
|
244407
246519
|
await createProjectFilesForExistingProject({
|
|
244408
246520
|
projectId,
|
|
@@ -244478,7 +246590,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
244478
246590
|
import { release, type } from "node:os";
|
|
244479
246591
|
|
|
244480
246592
|
// node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
244481
|
-
import { dirname as
|
|
246593
|
+
import { dirname as dirname16, posix, sep } from "path";
|
|
244482
246594
|
function createModulerModifier() {
|
|
244483
246595
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
244484
246596
|
return async (frames) => {
|
|
@@ -244487,12 +246599,12 @@ function createModulerModifier() {
|
|
|
244487
246599
|
return frames;
|
|
244488
246600
|
};
|
|
244489
246601
|
}
|
|
244490
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
244491
|
-
const normalizedBase =
|
|
246602
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
246603
|
+
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
244492
246604
|
return (filename) => {
|
|
244493
246605
|
if (!filename)
|
|
244494
246606
|
return;
|
|
244495
|
-
const normalizedFilename =
|
|
246607
|
+
const normalizedFilename = isWindows5 ? normalizeWindowsPath2(filename) : filename;
|
|
244496
246608
|
let { dir, base: file2, ext } = posix.parse(normalizedFilename);
|
|
244497
246609
|
if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
|
|
244498
246610
|
file2 = file2.slice(0, -1 * ext.length);
|
|
@@ -246765,14 +248877,14 @@ async function addSourceContext(frames) {
|
|
|
246765
248877
|
return frames;
|
|
246766
248878
|
}
|
|
246767
248879
|
function getContextLinesFromFile(path19, ranges, output) {
|
|
246768
|
-
return new Promise((
|
|
248880
|
+
return new Promise((resolve9) => {
|
|
246769
248881
|
const stream = createReadStream2(path19);
|
|
246770
248882
|
const lineReaded = createInterface2({
|
|
246771
248883
|
input: stream
|
|
246772
248884
|
});
|
|
246773
248885
|
function destroyStreamAndResolve() {
|
|
246774
248886
|
stream.destroy();
|
|
246775
|
-
|
|
248887
|
+
resolve9();
|
|
246776
248888
|
}
|
|
246777
248889
|
let lineNumber = 0;
|
|
246778
248890
|
let currentRangeIndex = 0;
|
|
@@ -247884,15 +249996,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
|
|
|
247884
249996
|
return true;
|
|
247885
249997
|
if (this.featureFlagsPoller === undefined)
|
|
247886
249998
|
return false;
|
|
247887
|
-
return new Promise((
|
|
249999
|
+
return new Promise((resolve9) => {
|
|
247888
250000
|
const timeout3 = setTimeout(() => {
|
|
247889
250001
|
cleanup();
|
|
247890
|
-
|
|
250002
|
+
resolve9(false);
|
|
247891
250003
|
}, timeoutMs);
|
|
247892
250004
|
const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
|
|
247893
250005
|
clearTimeout(timeout3);
|
|
247894
250006
|
cleanup();
|
|
247895
|
-
|
|
250007
|
+
resolve9(count2 > 0);
|
|
247896
250008
|
});
|
|
247897
250009
|
});
|
|
247898
250010
|
}
|
|
@@ -248705,4 +250817,4 @@ export {
|
|
|
248705
250817
|
CLIExitError
|
|
248706
250818
|
};
|
|
248707
250819
|
|
|
248708
|
-
//# debugId=
|
|
250820
|
+
//# debugId=C45EABCE4926B36664756E2164756E21
|