@base44-preview/cli 0.0.36-pr.348.945ec67 → 0.0.36-pr.353.17ecffc
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 +2292 -243
- package/dist/cli/index.js.map +39 -8
- package/package.json +4 -3
package/dist/cli/index.js
CHANGED
|
@@ -13211,58 +13211,34 @@ var require_cross_spawn = __commonJS((exports, module) => {
|
|
|
13211
13211
|
module.exports._enoent = enoent;
|
|
13212
13212
|
});
|
|
13213
13213
|
|
|
13214
|
-
// node_modules/lodash
|
|
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";
|
|
@@ -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();
|
|
@@ -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();
|
|
@@ -165981,6 +166165,168 @@ var require_nedb = __commonJS((exports, module) => {
|
|
|
165981
166165
|
module.exports = Datastore;
|
|
165982
166166
|
});
|
|
165983
166167
|
|
|
166168
|
+
// node_modules/lodash/isObject.js
|
|
166169
|
+
var require_isObject = __commonJS((exports, module) => {
|
|
166170
|
+
function isObject5(value) {
|
|
166171
|
+
var type = typeof value;
|
|
166172
|
+
return value != null && (type == "object" || type == "function");
|
|
166173
|
+
}
|
|
166174
|
+
module.exports = isObject5;
|
|
166175
|
+
});
|
|
166176
|
+
|
|
166177
|
+
// node_modules/lodash/now.js
|
|
166178
|
+
var require_now = __commonJS((exports, module) => {
|
|
166179
|
+
var root2 = require__root();
|
|
166180
|
+
var now = function() {
|
|
166181
|
+
return root2.Date.now();
|
|
166182
|
+
};
|
|
166183
|
+
module.exports = now;
|
|
166184
|
+
});
|
|
166185
|
+
|
|
166186
|
+
// node_modules/lodash/_trimmedEndIndex.js
|
|
166187
|
+
var require__trimmedEndIndex = __commonJS((exports, module) => {
|
|
166188
|
+
var reWhitespace = /\s/;
|
|
166189
|
+
function trimmedEndIndex(string4) {
|
|
166190
|
+
var index = string4.length;
|
|
166191
|
+
while (index-- && reWhitespace.test(string4.charAt(index))) {}
|
|
166192
|
+
return index;
|
|
166193
|
+
}
|
|
166194
|
+
module.exports = trimmedEndIndex;
|
|
166195
|
+
});
|
|
166196
|
+
|
|
166197
|
+
// node_modules/lodash/_baseTrim.js
|
|
166198
|
+
var require__baseTrim = __commonJS((exports, module) => {
|
|
166199
|
+
var trimmedEndIndex = require__trimmedEndIndex();
|
|
166200
|
+
var reTrimStart = /^\s+/;
|
|
166201
|
+
function baseTrim(string4) {
|
|
166202
|
+
return string4 ? string4.slice(0, trimmedEndIndex(string4) + 1).replace(reTrimStart, "") : string4;
|
|
166203
|
+
}
|
|
166204
|
+
module.exports = baseTrim;
|
|
166205
|
+
});
|
|
166206
|
+
|
|
166207
|
+
// node_modules/lodash/toNumber.js
|
|
166208
|
+
var require_toNumber = __commonJS((exports, module) => {
|
|
166209
|
+
var baseTrim = require__baseTrim();
|
|
166210
|
+
var isObject5 = require_isObject();
|
|
166211
|
+
var isSymbol = require_isSymbol();
|
|
166212
|
+
var NAN = 0 / 0;
|
|
166213
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
166214
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
166215
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
166216
|
+
var freeParseInt = parseInt;
|
|
166217
|
+
function toNumber(value) {
|
|
166218
|
+
if (typeof value == "number") {
|
|
166219
|
+
return value;
|
|
166220
|
+
}
|
|
166221
|
+
if (isSymbol(value)) {
|
|
166222
|
+
return NAN;
|
|
166223
|
+
}
|
|
166224
|
+
if (isObject5(value)) {
|
|
166225
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
166226
|
+
value = isObject5(other) ? other + "" : other;
|
|
166227
|
+
}
|
|
166228
|
+
if (typeof value != "string") {
|
|
166229
|
+
return value === 0 ? value : +value;
|
|
166230
|
+
}
|
|
166231
|
+
value = baseTrim(value);
|
|
166232
|
+
var isBinary = reIsBinary.test(value);
|
|
166233
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
166234
|
+
}
|
|
166235
|
+
module.exports = toNumber;
|
|
166236
|
+
});
|
|
166237
|
+
|
|
166238
|
+
// node_modules/lodash/debounce.js
|
|
166239
|
+
var require_debounce = __commonJS((exports, module) => {
|
|
166240
|
+
var isObject5 = require_isObject();
|
|
166241
|
+
var now = require_now();
|
|
166242
|
+
var toNumber = require_toNumber();
|
|
166243
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
166244
|
+
var nativeMax = Math.max;
|
|
166245
|
+
var nativeMin = Math.min;
|
|
166246
|
+
function debounce(func, wait, options8) {
|
|
166247
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
166248
|
+
if (typeof func != "function") {
|
|
166249
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
166250
|
+
}
|
|
166251
|
+
wait = toNumber(wait) || 0;
|
|
166252
|
+
if (isObject5(options8)) {
|
|
166253
|
+
leading = !!options8.leading;
|
|
166254
|
+
maxing = "maxWait" in options8;
|
|
166255
|
+
maxWait = maxing ? nativeMax(toNumber(options8.maxWait) || 0, wait) : maxWait;
|
|
166256
|
+
trailing = "trailing" in options8 ? !!options8.trailing : trailing;
|
|
166257
|
+
}
|
|
166258
|
+
function invokeFunc(time3) {
|
|
166259
|
+
var args = lastArgs, thisArg = lastThis;
|
|
166260
|
+
lastArgs = lastThis = undefined;
|
|
166261
|
+
lastInvokeTime = time3;
|
|
166262
|
+
result = func.apply(thisArg, args);
|
|
166263
|
+
return result;
|
|
166264
|
+
}
|
|
166265
|
+
function leadingEdge(time3) {
|
|
166266
|
+
lastInvokeTime = time3;
|
|
166267
|
+
timerId = setTimeout(timerExpired, wait);
|
|
166268
|
+
return leading ? invokeFunc(time3) : result;
|
|
166269
|
+
}
|
|
166270
|
+
function remainingWait(time3) {
|
|
166271
|
+
var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
166272
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
166273
|
+
}
|
|
166274
|
+
function shouldInvoke(time3) {
|
|
166275
|
+
var timeSinceLastCall = time3 - lastCallTime, timeSinceLastInvoke = time3 - lastInvokeTime;
|
|
166276
|
+
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
166277
|
+
}
|
|
166278
|
+
function timerExpired() {
|
|
166279
|
+
var time3 = now();
|
|
166280
|
+
if (shouldInvoke(time3)) {
|
|
166281
|
+
return trailingEdge(time3);
|
|
166282
|
+
}
|
|
166283
|
+
timerId = setTimeout(timerExpired, remainingWait(time3));
|
|
166284
|
+
}
|
|
166285
|
+
function trailingEdge(time3) {
|
|
166286
|
+
timerId = undefined;
|
|
166287
|
+
if (trailing && lastArgs) {
|
|
166288
|
+
return invokeFunc(time3);
|
|
166289
|
+
}
|
|
166290
|
+
lastArgs = lastThis = undefined;
|
|
166291
|
+
return result;
|
|
166292
|
+
}
|
|
166293
|
+
function cancel() {
|
|
166294
|
+
if (timerId !== undefined) {
|
|
166295
|
+
clearTimeout(timerId);
|
|
166296
|
+
}
|
|
166297
|
+
lastInvokeTime = 0;
|
|
166298
|
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
166299
|
+
}
|
|
166300
|
+
function flush() {
|
|
166301
|
+
return timerId === undefined ? result : trailingEdge(now());
|
|
166302
|
+
}
|
|
166303
|
+
function debounced() {
|
|
166304
|
+
var time3 = now(), isInvoking = shouldInvoke(time3);
|
|
166305
|
+
lastArgs = arguments;
|
|
166306
|
+
lastThis = this;
|
|
166307
|
+
lastCallTime = time3;
|
|
166308
|
+
if (isInvoking) {
|
|
166309
|
+
if (timerId === undefined) {
|
|
166310
|
+
return leadingEdge(lastCallTime);
|
|
166311
|
+
}
|
|
166312
|
+
if (maxing) {
|
|
166313
|
+
clearTimeout(timerId);
|
|
166314
|
+
timerId = setTimeout(timerExpired, wait);
|
|
166315
|
+
return invokeFunc(lastCallTime);
|
|
166316
|
+
}
|
|
166317
|
+
}
|
|
166318
|
+
if (timerId === undefined) {
|
|
166319
|
+
timerId = setTimeout(timerExpired, wait);
|
|
166320
|
+
}
|
|
166321
|
+
return result;
|
|
166322
|
+
}
|
|
166323
|
+
debounced.cancel = cancel;
|
|
166324
|
+
debounced.flush = flush;
|
|
166325
|
+
return debounced;
|
|
166326
|
+
}
|
|
166327
|
+
module.exports = debounce;
|
|
166328
|
+
});
|
|
166329
|
+
|
|
165984
166330
|
// node_modules/socket.io/node_modules/accepts/node_modules/negotiator/lib/charset.js
|
|
165985
166331
|
var require_charset2 = __commonJS((exports, module) => {
|
|
165986
166332
|
module.exports = preferredCharsets;
|
|
@@ -175009,7 +175355,7 @@ var require_mime_types2 = __commonJS((exports) => {
|
|
|
175009
175355
|
* MIT Licensed
|
|
175010
175356
|
*/
|
|
175011
175357
|
var db2 = require_db2();
|
|
175012
|
-
var
|
|
175358
|
+
var extname3 = __require("path").extname;
|
|
175013
175359
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
175014
175360
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
175015
175361
|
exports.charset = charset;
|
|
@@ -175064,7 +175410,7 @@ var require_mime_types2 = __commonJS((exports) => {
|
|
|
175064
175410
|
if (!path18 || typeof path18 !== "string") {
|
|
175065
175411
|
return false;
|
|
175066
175412
|
}
|
|
175067
|
-
var extension2 =
|
|
175413
|
+
var extension2 = extname3("x." + path18).toLowerCase().substr(1);
|
|
175068
175414
|
if (!extension2) {
|
|
175069
175415
|
return false;
|
|
175070
175416
|
}
|
|
@@ -185056,7 +185402,7 @@ var require_mime_types3 = __commonJS((exports) => {
|
|
|
185056
185402
|
* MIT Licensed
|
|
185057
185403
|
*/
|
|
185058
185404
|
var db2 = require_db3();
|
|
185059
|
-
var
|
|
185405
|
+
var extname3 = __require("path").extname;
|
|
185060
185406
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
185061
185407
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
185062
185408
|
exports.charset = charset;
|
|
@@ -185111,7 +185457,7 @@ var require_mime_types3 = __commonJS((exports) => {
|
|
|
185111
185457
|
if (!path18 || typeof path18 !== "string") {
|
|
185112
185458
|
return false;
|
|
185113
185459
|
}
|
|
185114
|
-
var extension2 =
|
|
185460
|
+
var extension2 = extname3("x." + path18).toLowerCase().substr(1);
|
|
185115
185461
|
if (!extension2) {
|
|
185116
185462
|
return false;
|
|
185117
185463
|
}
|
|
@@ -187629,13 +187975,13 @@ var require_extension = __commonJS((exports, module) => {
|
|
|
187629
187975
|
|
|
187630
187976
|
// node_modules/ws/lib/websocket.js
|
|
187631
187977
|
var require_websocket2 = __commonJS((exports, module) => {
|
|
187632
|
-
var
|
|
187978
|
+
var EventEmitter4 = __require("events");
|
|
187633
187979
|
var https = __require("https");
|
|
187634
187980
|
var http = __require("http");
|
|
187635
187981
|
var net2 = __require("net");
|
|
187636
187982
|
var tls = __require("tls");
|
|
187637
187983
|
var { randomBytes: randomBytes2, createHash } = __require("crypto");
|
|
187638
|
-
var { Duplex: Duplex4, Readable:
|
|
187984
|
+
var { Duplex: Duplex4, Readable: Readable7 } = __require("stream");
|
|
187639
187985
|
var { URL: URL2 } = __require("url");
|
|
187640
187986
|
var PerMessageDeflate = require_permessage_deflate();
|
|
187641
187987
|
var Receiver = require_receiver();
|
|
@@ -187662,7 +188008,7 @@ var require_websocket2 = __commonJS((exports, module) => {
|
|
|
187662
188008
|
var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
|
|
187663
188009
|
var subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
|
|
187664
188010
|
|
|
187665
|
-
class WebSocket extends
|
|
188011
|
+
class WebSocket extends EventEmitter4 {
|
|
187666
188012
|
constructor(address, protocols, options8) {
|
|
187667
188013
|
super();
|
|
187668
188014
|
this._binaryType = BINARY_TYPES[0];
|
|
@@ -188451,7 +188797,7 @@ var require_stream6 = __commonJS((exports, module) => {
|
|
|
188451
188797
|
};
|
|
188452
188798
|
duplex2._final = function(callback) {
|
|
188453
188799
|
if (ws8.readyState === ws8.CONNECTING) {
|
|
188454
|
-
ws8.once("open", function
|
|
188800
|
+
ws8.once("open", function open3() {
|
|
188455
188801
|
duplex2._final(callback);
|
|
188456
188802
|
});
|
|
188457
188803
|
return;
|
|
@@ -188475,7 +188821,7 @@ var require_stream6 = __commonJS((exports, module) => {
|
|
|
188475
188821
|
};
|
|
188476
188822
|
duplex2._write = function(chunk, encoding, callback) {
|
|
188477
188823
|
if (ws8.readyState === ws8.CONNECTING) {
|
|
188478
|
-
ws8.once("open", function
|
|
188824
|
+
ws8.once("open", function open3() {
|
|
188479
188825
|
duplex2._write(chunk, encoding, callback);
|
|
188480
188826
|
});
|
|
188481
188827
|
return;
|
|
@@ -188536,7 +188882,7 @@ var require_subprotocol = __commonJS((exports, module) => {
|
|
|
188536
188882
|
|
|
188537
188883
|
// node_modules/ws/lib/websocket-server.js
|
|
188538
188884
|
var require_websocket_server = __commonJS((exports, module) => {
|
|
188539
|
-
var
|
|
188885
|
+
var EventEmitter4 = __require("events");
|
|
188540
188886
|
var http = __require("http");
|
|
188541
188887
|
var { Duplex: Duplex4 } = __require("stream");
|
|
188542
188888
|
var { createHash } = __require("crypto");
|
|
@@ -188550,7 +188896,7 @@ var require_websocket_server = __commonJS((exports, module) => {
|
|
|
188550
188896
|
var CLOSING = 1;
|
|
188551
188897
|
var CLOSED2 = 2;
|
|
188552
188898
|
|
|
188553
|
-
class WebSocketServer extends
|
|
188899
|
+
class WebSocketServer extends EventEmitter4 {
|
|
188554
188900
|
constructor(options8, callback) {
|
|
188555
188901
|
super();
|
|
188556
188902
|
options8 = {
|
|
@@ -191087,13 +191433,13 @@ var require_broadcast_operator = __commonJS((exports) => {
|
|
|
191087
191433
|
return true;
|
|
191088
191434
|
}
|
|
191089
191435
|
emitWithAck(ev2, ...args) {
|
|
191090
|
-
return new Promise((
|
|
191436
|
+
return new Promise((resolve8, reject) => {
|
|
191091
191437
|
args.push((err, responses) => {
|
|
191092
191438
|
if (err) {
|
|
191093
191439
|
err.responses = responses;
|
|
191094
191440
|
return reject(err);
|
|
191095
191441
|
} else {
|
|
191096
|
-
return
|
|
191442
|
+
return resolve8(responses);
|
|
191097
191443
|
}
|
|
191098
191444
|
});
|
|
191099
191445
|
this.emit(ev2, ...args);
|
|
@@ -191281,12 +191627,12 @@ var require_socket2 = __commonJS((exports) => {
|
|
|
191281
191627
|
}
|
|
191282
191628
|
emitWithAck(ev2, ...args) {
|
|
191283
191629
|
const withErr = this.flags.timeout !== undefined;
|
|
191284
|
-
return new Promise((
|
|
191630
|
+
return new Promise((resolve8, reject) => {
|
|
191285
191631
|
args.push((arg1, arg2) => {
|
|
191286
191632
|
if (withErr) {
|
|
191287
|
-
return arg1 ? reject(arg1) :
|
|
191633
|
+
return arg1 ? reject(arg1) : resolve8(arg2);
|
|
191288
191634
|
} else {
|
|
191289
|
-
return
|
|
191635
|
+
return resolve8(arg1);
|
|
191290
191636
|
}
|
|
191291
191637
|
});
|
|
191292
191638
|
this.emit(ev2, ...args);
|
|
@@ -191741,13 +192087,13 @@ var require_namespace = __commonJS((exports) => {
|
|
|
191741
192087
|
return true;
|
|
191742
192088
|
}
|
|
191743
192089
|
serverSideEmitWithAck(ev2, ...args) {
|
|
191744
|
-
return new Promise((
|
|
192090
|
+
return new Promise((resolve8, reject) => {
|
|
191745
192091
|
args.push((err, responses) => {
|
|
191746
192092
|
if (err) {
|
|
191747
192093
|
err.responses = responses;
|
|
191748
192094
|
return reject(err);
|
|
191749
192095
|
} else {
|
|
191750
|
-
return
|
|
192096
|
+
return resolve8(responses);
|
|
191751
192097
|
}
|
|
191752
192098
|
});
|
|
191753
192099
|
this.serverSideEmit(ev2, ...args);
|
|
@@ -192431,7 +192777,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
192431
192777
|
return localSockets;
|
|
192432
192778
|
}
|
|
192433
192779
|
const requestId = randomId();
|
|
192434
|
-
return new Promise((
|
|
192780
|
+
return new Promise((resolve8, reject) => {
|
|
192435
192781
|
const timeout3 = setTimeout(() => {
|
|
192436
192782
|
const storedRequest2 = this.requests.get(requestId);
|
|
192437
192783
|
if (storedRequest2) {
|
|
@@ -192441,7 +192787,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
192441
192787
|
}, opts.flags.timeout || DEFAULT_TIMEOUT);
|
|
192442
192788
|
const storedRequest = {
|
|
192443
192789
|
type: MessageType.FETCH_SOCKETS,
|
|
192444
|
-
resolve:
|
|
192790
|
+
resolve: resolve8,
|
|
192445
192791
|
timeout: timeout3,
|
|
192446
192792
|
current: 0,
|
|
192447
192793
|
expected: expectedResponseCount,
|
|
@@ -192651,7 +192997,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
192651
192997
|
return localSockets;
|
|
192652
192998
|
}
|
|
192653
192999
|
const requestId = randomId();
|
|
192654
|
-
return new Promise((
|
|
193000
|
+
return new Promise((resolve8, reject) => {
|
|
192655
193001
|
const timeout3 = setTimeout(() => {
|
|
192656
193002
|
const storedRequest2 = this.customRequests.get(requestId);
|
|
192657
193003
|
if (storedRequest2) {
|
|
@@ -192661,7 +193007,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
192661
193007
|
}, opts.flags.timeout || DEFAULT_TIMEOUT);
|
|
192662
193008
|
const storedRequest = {
|
|
192663
193009
|
type: MessageType.FETCH_SOCKETS,
|
|
192664
|
-
resolve:
|
|
193010
|
+
resolve: resolve8,
|
|
192665
193011
|
timeout: timeout3,
|
|
192666
193012
|
missingUids: new Set([...this.nodesMap.keys()]),
|
|
192667
193013
|
responses: localSockets
|
|
@@ -193390,13 +193736,13 @@ var require_dist4 = __commonJS((exports, module) => {
|
|
|
193390
193736
|
this.engine.close();
|
|
193391
193737
|
(0, uws_1.restoreAdapter)();
|
|
193392
193738
|
if (this.httpServer) {
|
|
193393
|
-
return new Promise((
|
|
193739
|
+
return new Promise((resolve8) => {
|
|
193394
193740
|
this.httpServer.close((err) => {
|
|
193395
193741
|
fn9 && fn9(err);
|
|
193396
193742
|
if (err) {
|
|
193397
193743
|
debug("server was not running");
|
|
193398
193744
|
}
|
|
193399
|
-
|
|
193745
|
+
resolve8();
|
|
193400
193746
|
});
|
|
193401
193747
|
});
|
|
193402
193748
|
} else {
|
|
@@ -202132,7 +202478,7 @@ var require_mime_types4 = __commonJS((exports) => {
|
|
|
202132
202478
|
* MIT Licensed
|
|
202133
202479
|
*/
|
|
202134
202480
|
var db2 = require_db4();
|
|
202135
|
-
var
|
|
202481
|
+
var extname3 = __require("path").extname;
|
|
202136
202482
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
202137
202483
|
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
202138
202484
|
exports.charset = charset;
|
|
@@ -202187,7 +202533,7 @@ var require_mime_types4 = __commonJS((exports) => {
|
|
|
202187
202533
|
if (!path18 || typeof path18 !== "string") {
|
|
202188
202534
|
return false;
|
|
202189
202535
|
}
|
|
202190
|
-
var extension2 =
|
|
202536
|
+
var extension2 = extname3("x." + path18).toLowerCase().substr(1);
|
|
202191
202537
|
if (!extension2) {
|
|
202192
202538
|
return false;
|
|
202193
202539
|
}
|
|
@@ -202230,7 +202576,7 @@ var require_type_is2 = __commonJS((exports, module) => {
|
|
|
202230
202576
|
module.exports = typeofrequest;
|
|
202231
202577
|
module.exports.is = typeis;
|
|
202232
202578
|
module.exports.hasBody = hasbody;
|
|
202233
|
-
module.exports.normalize =
|
|
202579
|
+
module.exports.normalize = normalize2;
|
|
202234
202580
|
module.exports.match = mimeMatch;
|
|
202235
202581
|
function typeis(value, types_) {
|
|
202236
202582
|
var i5;
|
|
@@ -202250,7 +202596,7 @@ var require_type_is2 = __commonJS((exports, module) => {
|
|
|
202250
202596
|
}
|
|
202251
202597
|
var type;
|
|
202252
202598
|
for (i5 = 0;i5 < types.length; i5++) {
|
|
202253
|
-
if (mimeMatch(
|
|
202599
|
+
if (mimeMatch(normalize2(type = types[i5]), val)) {
|
|
202254
202600
|
return type[0] === "+" || type.indexOf("*") !== -1 ? val : type;
|
|
202255
202601
|
}
|
|
202256
202602
|
}
|
|
@@ -202273,7 +202619,7 @@ var require_type_is2 = __commonJS((exports, module) => {
|
|
|
202273
202619
|
var value = req.headers["content-type"];
|
|
202274
202620
|
return typeis(value, types);
|
|
202275
202621
|
}
|
|
202276
|
-
function
|
|
202622
|
+
function normalize2(type) {
|
|
202277
202623
|
if (typeof type !== "string") {
|
|
202278
202624
|
return false;
|
|
202279
202625
|
}
|
|
@@ -202694,7 +203040,7 @@ var require_utils12 = __commonJS((exports, module) => {
|
|
|
202694
203040
|
if (decode4)
|
|
202695
203041
|
return decode4(data, hint);
|
|
202696
203042
|
}
|
|
202697
|
-
function
|
|
203043
|
+
function basename6(path18) {
|
|
202698
203044
|
if (typeof path18 !== "string")
|
|
202699
203045
|
return "";
|
|
202700
203046
|
for (let i5 = path18.length - 1;i5 >= 0; --i5) {
|
|
@@ -203998,7 +204344,7 @@ var require_utils12 = __commonJS((exports, module) => {
|
|
|
203998
204344
|
-1
|
|
203999
204345
|
];
|
|
204000
204346
|
module.exports = {
|
|
204001
|
-
basename:
|
|
204347
|
+
basename: basename6,
|
|
204002
204348
|
convertToUTF8,
|
|
204003
204349
|
getDecoder,
|
|
204004
204350
|
parseContentType,
|
|
@@ -204403,10 +204749,10 @@ var require_sbmh = __commonJS((exports, module) => {
|
|
|
204403
204749
|
|
|
204404
204750
|
// node_modules/busboy/lib/types/multipart.js
|
|
204405
204751
|
var require_multipart = __commonJS((exports, module) => {
|
|
204406
|
-
var { Readable:
|
|
204752
|
+
var { Readable: Readable7, Writable: Writable4 } = __require("stream");
|
|
204407
204753
|
var StreamSearch = require_sbmh();
|
|
204408
204754
|
var {
|
|
204409
|
-
basename:
|
|
204755
|
+
basename: basename6,
|
|
204410
204756
|
convertToUTF8,
|
|
204411
204757
|
getDecoder,
|
|
204412
204758
|
parseContentType,
|
|
@@ -204561,7 +204907,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
204561
204907
|
}
|
|
204562
204908
|
}
|
|
204563
204909
|
|
|
204564
|
-
class FileStream extends
|
|
204910
|
+
class FileStream extends Readable7 {
|
|
204565
204911
|
constructor(opts, owner) {
|
|
204566
204912
|
super(opts);
|
|
204567
204913
|
this.truncated = false;
|
|
@@ -204668,7 +205014,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
204668
205014
|
else if (disp.params.filename)
|
|
204669
205015
|
filename = disp.params.filename;
|
|
204670
205016
|
if (filename !== undefined && !preservePath)
|
|
204671
|
-
filename =
|
|
205017
|
+
filename = basename6(filename);
|
|
204672
205018
|
}
|
|
204673
205019
|
if (header2["content-type"]) {
|
|
204674
205020
|
const conType = parseContentType(header2["content-type"][0]);
|
|
@@ -206153,12 +206499,12 @@ var require_append_field = __commonJS((exports, module) => {
|
|
|
206153
206499
|
|
|
206154
206500
|
// node_modules/multer/lib/counter.js
|
|
206155
206501
|
var require_counter = __commonJS((exports, module) => {
|
|
206156
|
-
var
|
|
206502
|
+
var EventEmitter4 = __require("events").EventEmitter;
|
|
206157
206503
|
function Counter() {
|
|
206158
|
-
|
|
206504
|
+
EventEmitter4.call(this);
|
|
206159
206505
|
this.value = 0;
|
|
206160
206506
|
}
|
|
206161
|
-
Counter.prototype = Object.create(
|
|
206507
|
+
Counter.prototype = Object.create(EventEmitter4.prototype);
|
|
206162
206508
|
Counter.prototype.increment = function increment2() {
|
|
206163
206509
|
this.value++;
|
|
206164
206510
|
};
|
|
@@ -206519,8 +206865,8 @@ var require_mkdirp = __commonJS((exports, module) => {
|
|
|
206519
206865
|
});
|
|
206520
206866
|
break;
|
|
206521
206867
|
default:
|
|
206522
|
-
xfs.stat(p4, function(er22,
|
|
206523
|
-
if (er22 || !
|
|
206868
|
+
xfs.stat(p4, function(er22, stat5) {
|
|
206869
|
+
if (er22 || !stat5.isDirectory())
|
|
206524
206870
|
cb2(er10, made);
|
|
206525
206871
|
else
|
|
206526
206872
|
cb2(null, made);
|
|
@@ -206551,13 +206897,13 @@ var require_mkdirp = __commonJS((exports, module) => {
|
|
|
206551
206897
|
sync(p4, opts, made);
|
|
206552
206898
|
break;
|
|
206553
206899
|
default:
|
|
206554
|
-
var
|
|
206900
|
+
var stat5;
|
|
206555
206901
|
try {
|
|
206556
|
-
|
|
206902
|
+
stat5 = xfs.statSync(p4);
|
|
206557
206903
|
} catch (err1) {
|
|
206558
206904
|
throw err0;
|
|
206559
206905
|
}
|
|
206560
|
-
if (!
|
|
206906
|
+
if (!stat5.isDirectory())
|
|
206561
206907
|
throw err0;
|
|
206562
206908
|
break;
|
|
206563
206909
|
}
|
|
@@ -206760,7 +207106,7 @@ var require_buffer_list = __commonJS((exports, module) => {
|
|
|
206760
207106
|
}
|
|
206761
207107
|
}, {
|
|
206762
207108
|
key: "join",
|
|
206763
|
-
value: function
|
|
207109
|
+
value: function join18(s5) {
|
|
206764
207110
|
if (this.length === 0)
|
|
206765
207111
|
return "";
|
|
206766
207112
|
var p4 = this.head;
|
|
@@ -207586,9 +207932,9 @@ var require__stream_duplex = __commonJS((exports, module) => {
|
|
|
207586
207932
|
return keys2;
|
|
207587
207933
|
};
|
|
207588
207934
|
module.exports = Duplex4;
|
|
207589
|
-
var
|
|
207935
|
+
var Readable7 = require__stream_readable();
|
|
207590
207936
|
var Writable4 = require__stream_writable();
|
|
207591
|
-
require_inherits()(Duplex4,
|
|
207937
|
+
require_inherits()(Duplex4, Readable7);
|
|
207592
207938
|
{
|
|
207593
207939
|
keys = objectKeys(Writable4.prototype);
|
|
207594
207940
|
for (v10 = 0;v10 < keys.length; v10++) {
|
|
@@ -207603,7 +207949,7 @@ var require__stream_duplex = __commonJS((exports, module) => {
|
|
|
207603
207949
|
function Duplex4(options8) {
|
|
207604
207950
|
if (!(this instanceof Duplex4))
|
|
207605
207951
|
return new Duplex4(options8);
|
|
207606
|
-
|
|
207952
|
+
Readable7.call(this, options8);
|
|
207607
207953
|
Writable4.call(this, options8);
|
|
207608
207954
|
this.allowHalfOpen = true;
|
|
207609
207955
|
if (options8) {
|
|
@@ -208115,14 +208461,14 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208115
208461
|
};
|
|
208116
208462
|
}
|
|
208117
208463
|
function readAndResolve(iter) {
|
|
208118
|
-
var
|
|
208119
|
-
if (
|
|
208464
|
+
var resolve8 = iter[kLastResolve];
|
|
208465
|
+
if (resolve8 !== null) {
|
|
208120
208466
|
var data = iter[kStream].read();
|
|
208121
208467
|
if (data !== null) {
|
|
208122
208468
|
iter[kLastPromise] = null;
|
|
208123
208469
|
iter[kLastResolve] = null;
|
|
208124
208470
|
iter[kLastReject] = null;
|
|
208125
|
-
|
|
208471
|
+
resolve8(createIterResult(data, false));
|
|
208126
208472
|
}
|
|
208127
208473
|
}
|
|
208128
208474
|
}
|
|
@@ -208130,13 +208476,13 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208130
208476
|
process.nextTick(readAndResolve, iter);
|
|
208131
208477
|
}
|
|
208132
208478
|
function wrapForNext(lastPromise, iter) {
|
|
208133
|
-
return function(
|
|
208479
|
+
return function(resolve8, reject) {
|
|
208134
208480
|
lastPromise.then(function() {
|
|
208135
208481
|
if (iter[kEnded]) {
|
|
208136
|
-
|
|
208482
|
+
resolve8(createIterResult(undefined, true));
|
|
208137
208483
|
return;
|
|
208138
208484
|
}
|
|
208139
|
-
iter[kHandlePromise](
|
|
208485
|
+
iter[kHandlePromise](resolve8, reject);
|
|
208140
208486
|
}, reject);
|
|
208141
208487
|
};
|
|
208142
208488
|
}
|
|
@@ -208155,12 +208501,12 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208155
208501
|
return Promise.resolve(createIterResult(undefined, true));
|
|
208156
208502
|
}
|
|
208157
208503
|
if (this[kStream].destroyed) {
|
|
208158
|
-
return new Promise(function(
|
|
208504
|
+
return new Promise(function(resolve8, reject) {
|
|
208159
208505
|
process.nextTick(function() {
|
|
208160
208506
|
if (_this[kError]) {
|
|
208161
208507
|
reject(_this[kError]);
|
|
208162
208508
|
} else {
|
|
208163
|
-
|
|
208509
|
+
resolve8(createIterResult(undefined, true));
|
|
208164
208510
|
}
|
|
208165
208511
|
});
|
|
208166
208512
|
});
|
|
@@ -208183,13 +208529,13 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208183
208529
|
return this;
|
|
208184
208530
|
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
208185
208531
|
var _this2 = this;
|
|
208186
|
-
return new Promise(function(
|
|
208532
|
+
return new Promise(function(resolve8, reject) {
|
|
208187
208533
|
_this2[kStream].destroy(null, function(err) {
|
|
208188
208534
|
if (err) {
|
|
208189
208535
|
reject(err);
|
|
208190
208536
|
return;
|
|
208191
208537
|
}
|
|
208192
|
-
|
|
208538
|
+
resolve8(createIterResult(undefined, true));
|
|
208193
208539
|
});
|
|
208194
208540
|
});
|
|
208195
208541
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -208211,15 +208557,15 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208211
208557
|
value: stream._readableState.endEmitted,
|
|
208212
208558
|
writable: true
|
|
208213
208559
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
208214
|
-
value: function value(
|
|
208560
|
+
value: function value(resolve8, reject) {
|
|
208215
208561
|
var data = iterator[kStream].read();
|
|
208216
208562
|
if (data) {
|
|
208217
208563
|
iterator[kLastPromise] = null;
|
|
208218
208564
|
iterator[kLastResolve] = null;
|
|
208219
208565
|
iterator[kLastReject] = null;
|
|
208220
|
-
|
|
208566
|
+
resolve8(createIterResult(data, false));
|
|
208221
208567
|
} else {
|
|
208222
|
-
iterator[kLastResolve] =
|
|
208568
|
+
iterator[kLastResolve] = resolve8;
|
|
208223
208569
|
iterator[kLastReject] = reject;
|
|
208224
208570
|
}
|
|
208225
208571
|
},
|
|
@@ -208238,12 +208584,12 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208238
208584
|
iterator[kError] = err;
|
|
208239
208585
|
return;
|
|
208240
208586
|
}
|
|
208241
|
-
var
|
|
208242
|
-
if (
|
|
208587
|
+
var resolve8 = iterator[kLastResolve];
|
|
208588
|
+
if (resolve8 !== null) {
|
|
208243
208589
|
iterator[kLastPromise] = null;
|
|
208244
208590
|
iterator[kLastResolve] = null;
|
|
208245
208591
|
iterator[kLastReject] = null;
|
|
208246
|
-
|
|
208592
|
+
resolve8(createIterResult(undefined, true));
|
|
208247
208593
|
}
|
|
208248
208594
|
iterator[kEnded] = true;
|
|
208249
208595
|
});
|
|
@@ -208255,7 +208601,7 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
208255
208601
|
|
|
208256
208602
|
// node_modules/readable-stream/lib/internal/streams/from.js
|
|
208257
208603
|
var require_from = __commonJS((exports, module) => {
|
|
208258
|
-
function asyncGeneratorStep(gen,
|
|
208604
|
+
function asyncGeneratorStep(gen, resolve8, reject, _next, _throw, key2, arg) {
|
|
208259
208605
|
try {
|
|
208260
208606
|
var info = gen[key2](arg);
|
|
208261
208607
|
var value = info.value;
|
|
@@ -208264,7 +208610,7 @@ var require_from = __commonJS((exports, module) => {
|
|
|
208264
208610
|
return;
|
|
208265
208611
|
}
|
|
208266
208612
|
if (info.done) {
|
|
208267
|
-
|
|
208613
|
+
resolve8(value);
|
|
208268
208614
|
} else {
|
|
208269
208615
|
Promise.resolve(value).then(_next, _throw);
|
|
208270
208616
|
}
|
|
@@ -208272,13 +208618,13 @@ var require_from = __commonJS((exports, module) => {
|
|
|
208272
208618
|
function _asyncToGenerator(fn9) {
|
|
208273
208619
|
return function() {
|
|
208274
208620
|
var self2 = this, args = arguments;
|
|
208275
|
-
return new Promise(function(
|
|
208621
|
+
return new Promise(function(resolve8, reject) {
|
|
208276
208622
|
var gen = fn9.apply(self2, args);
|
|
208277
208623
|
function _next(value) {
|
|
208278
|
-
asyncGeneratorStep(gen,
|
|
208624
|
+
asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "next", value);
|
|
208279
208625
|
}
|
|
208280
208626
|
function _throw(err) {
|
|
208281
|
-
asyncGeneratorStep(gen,
|
|
208627
|
+
asyncGeneratorStep(gen, resolve8, reject, _next, _throw, "throw", err);
|
|
208282
208628
|
}
|
|
208283
208629
|
_next(undefined);
|
|
208284
208630
|
});
|
|
@@ -208331,7 +208677,7 @@ var require_from = __commonJS((exports, module) => {
|
|
|
208331
208677
|
return (hint === "string" ? String : Number)(input);
|
|
208332
208678
|
}
|
|
208333
208679
|
var ERR_INVALID_ARG_TYPE = require_errors3().codes.ERR_INVALID_ARG_TYPE;
|
|
208334
|
-
function from(
|
|
208680
|
+
function from(Readable7, iterable, opts) {
|
|
208335
208681
|
var iterator;
|
|
208336
208682
|
if (iterable && typeof iterable.next === "function") {
|
|
208337
208683
|
iterator = iterable;
|
|
@@ -208341,7 +208687,7 @@ var require_from = __commonJS((exports, module) => {
|
|
|
208341
208687
|
iterator = iterable[Symbol.iterator]();
|
|
208342
208688
|
else
|
|
208343
208689
|
throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
|
|
208344
|
-
var readable2 = new
|
|
208690
|
+
var readable2 = new Readable7(_objectSpread({
|
|
208345
208691
|
objectMode: true
|
|
208346
208692
|
}, opts));
|
|
208347
208693
|
var reading = false;
|
|
@@ -208378,9 +208724,9 @@ var require_from = __commonJS((exports, module) => {
|
|
|
208378
208724
|
|
|
208379
208725
|
// node_modules/readable-stream/lib/_stream_readable.js
|
|
208380
208726
|
var require__stream_readable = __commonJS((exports, module) => {
|
|
208381
|
-
module.exports =
|
|
208727
|
+
module.exports = Readable7;
|
|
208382
208728
|
var Duplex4;
|
|
208383
|
-
|
|
208729
|
+
Readable7.ReadableState = ReadableState;
|
|
208384
208730
|
var EE3 = __require("events").EventEmitter;
|
|
208385
208731
|
var EElistenerCount = function EElistenerCount2(emitter, type) {
|
|
208386
208732
|
return emitter.listeners(type).length;
|
|
@@ -208413,7 +208759,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208413
208759
|
var StringDecoder4;
|
|
208414
208760
|
var createReadableStreamAsyncIterator;
|
|
208415
208761
|
var from;
|
|
208416
|
-
require_inherits()(
|
|
208762
|
+
require_inherits()(Readable7, Stream2);
|
|
208417
208763
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
208418
208764
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
208419
208765
|
function prependListener(emitter, event, fn9) {
|
|
@@ -208464,10 +208810,10 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208464
208810
|
this.encoding = options8.encoding;
|
|
208465
208811
|
}
|
|
208466
208812
|
}
|
|
208467
|
-
function
|
|
208813
|
+
function Readable7(options8) {
|
|
208468
208814
|
Duplex4 = Duplex4 || require__stream_duplex();
|
|
208469
|
-
if (!(this instanceof
|
|
208470
|
-
return new
|
|
208815
|
+
if (!(this instanceof Readable7))
|
|
208816
|
+
return new Readable7(options8);
|
|
208471
208817
|
var isDuplex = this instanceof Duplex4;
|
|
208472
208818
|
this._readableState = new ReadableState(options8, this, isDuplex);
|
|
208473
208819
|
this.readable = true;
|
|
@@ -208479,7 +208825,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208479
208825
|
}
|
|
208480
208826
|
Stream2.call(this);
|
|
208481
208827
|
}
|
|
208482
|
-
Object.defineProperty(
|
|
208828
|
+
Object.defineProperty(Readable7.prototype, "destroyed", {
|
|
208483
208829
|
enumerable: false,
|
|
208484
208830
|
get: function get() {
|
|
208485
208831
|
if (this._readableState === undefined) {
|
|
@@ -208494,12 +208840,12 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208494
208840
|
this._readableState.destroyed = value;
|
|
208495
208841
|
}
|
|
208496
208842
|
});
|
|
208497
|
-
|
|
208498
|
-
|
|
208499
|
-
|
|
208843
|
+
Readable7.prototype.destroy = destroyImpl.destroy;
|
|
208844
|
+
Readable7.prototype._undestroy = destroyImpl.undestroy;
|
|
208845
|
+
Readable7.prototype._destroy = function(err, cb2) {
|
|
208500
208846
|
cb2(err);
|
|
208501
208847
|
};
|
|
208502
|
-
|
|
208848
|
+
Readable7.prototype.push = function(chunk, encoding) {
|
|
208503
208849
|
var state = this._readableState;
|
|
208504
208850
|
var skipChunkCheck;
|
|
208505
208851
|
if (!state.objectMode) {
|
|
@@ -208516,7 +208862,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208516
208862
|
}
|
|
208517
208863
|
return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
|
|
208518
208864
|
};
|
|
208519
|
-
|
|
208865
|
+
Readable7.prototype.unshift = function(chunk) {
|
|
208520
208866
|
return readableAddChunk(this, chunk, null, true, false);
|
|
208521
208867
|
};
|
|
208522
208868
|
function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
|
|
@@ -208585,10 +208931,10 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208585
208931
|
}
|
|
208586
208932
|
return er10;
|
|
208587
208933
|
}
|
|
208588
|
-
|
|
208934
|
+
Readable7.prototype.isPaused = function() {
|
|
208589
208935
|
return this._readableState.flowing === false;
|
|
208590
208936
|
};
|
|
208591
|
-
|
|
208937
|
+
Readable7.prototype.setEncoding = function(enc) {
|
|
208592
208938
|
if (!StringDecoder4)
|
|
208593
208939
|
StringDecoder4 = require_string_decoder().StringDecoder;
|
|
208594
208940
|
var decoder = new StringDecoder4(enc);
|
|
@@ -208642,7 +208988,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208642
208988
|
}
|
|
208643
208989
|
return state.length;
|
|
208644
208990
|
}
|
|
208645
|
-
|
|
208991
|
+
Readable7.prototype.read = function(n5) {
|
|
208646
208992
|
debug("read", n5);
|
|
208647
208993
|
n5 = parseInt(n5, 10);
|
|
208648
208994
|
var state = this._readableState;
|
|
@@ -208763,10 +209109,10 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208763
209109
|
}
|
|
208764
209110
|
state.readingMore = false;
|
|
208765
209111
|
}
|
|
208766
|
-
|
|
209112
|
+
Readable7.prototype._read = function(n5) {
|
|
208767
209113
|
errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
|
|
208768
209114
|
};
|
|
208769
|
-
|
|
209115
|
+
Readable7.prototype.pipe = function(dest, pipeOpts) {
|
|
208770
209116
|
var src = this;
|
|
208771
209117
|
var state = this._readableState;
|
|
208772
209118
|
switch (state.pipesCount) {
|
|
@@ -208874,7 +209220,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208874
209220
|
}
|
|
208875
209221
|
};
|
|
208876
209222
|
}
|
|
208877
|
-
|
|
209223
|
+
Readable7.prototype.unpipe = function(dest) {
|
|
208878
209224
|
var state = this._readableState;
|
|
208879
209225
|
var unpipeInfo = {
|
|
208880
209226
|
hasUnpiped: false
|
|
@@ -208915,7 +209261,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208915
209261
|
dest.emit("unpipe", this, unpipeInfo);
|
|
208916
209262
|
return this;
|
|
208917
209263
|
};
|
|
208918
|
-
|
|
209264
|
+
Readable7.prototype.on = function(ev2, fn9) {
|
|
208919
209265
|
var res = Stream2.prototype.on.call(this, ev2, fn9);
|
|
208920
209266
|
var state = this._readableState;
|
|
208921
209267
|
if (ev2 === "data") {
|
|
@@ -208937,15 +209283,15 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208937
209283
|
}
|
|
208938
209284
|
return res;
|
|
208939
209285
|
};
|
|
208940
|
-
|
|
208941
|
-
|
|
209286
|
+
Readable7.prototype.addListener = Readable7.prototype.on;
|
|
209287
|
+
Readable7.prototype.removeListener = function(ev2, fn9) {
|
|
208942
209288
|
var res = Stream2.prototype.removeListener.call(this, ev2, fn9);
|
|
208943
209289
|
if (ev2 === "readable") {
|
|
208944
209290
|
process.nextTick(updateReadableListening, this);
|
|
208945
209291
|
}
|
|
208946
209292
|
return res;
|
|
208947
209293
|
};
|
|
208948
|
-
|
|
209294
|
+
Readable7.prototype.removeAllListeners = function(ev2) {
|
|
208949
209295
|
var res = Stream2.prototype.removeAllListeners.apply(this, arguments);
|
|
208950
209296
|
if (ev2 === "readable" || ev2 === undefined) {
|
|
208951
209297
|
process.nextTick(updateReadableListening, this);
|
|
@@ -208965,7 +209311,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208965
209311
|
debug("readable nexttick read 0");
|
|
208966
209312
|
self2.read(0);
|
|
208967
209313
|
}
|
|
208968
|
-
|
|
209314
|
+
Readable7.prototype.resume = function() {
|
|
208969
209315
|
var state = this._readableState;
|
|
208970
209316
|
if (!state.flowing) {
|
|
208971
209317
|
debug("resume");
|
|
@@ -208992,7 +209338,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
208992
209338
|
if (state.flowing && !state.reading)
|
|
208993
209339
|
stream.read(0);
|
|
208994
209340
|
}
|
|
208995
|
-
|
|
209341
|
+
Readable7.prototype.pause = function() {
|
|
208996
209342
|
debug("call pause flowing=%j", this._readableState.flowing);
|
|
208997
209343
|
if (this._readableState.flowing !== false) {
|
|
208998
209344
|
debug("pause");
|
|
@@ -209008,7 +209354,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
209008
209354
|
while (state.flowing && stream.read() !== null)
|
|
209009
209355
|
;
|
|
209010
209356
|
}
|
|
209011
|
-
|
|
209357
|
+
Readable7.prototype.wrap = function(stream) {
|
|
209012
209358
|
var _this = this;
|
|
209013
209359
|
var state = this._readableState;
|
|
209014
209360
|
var paused = false;
|
|
@@ -209057,26 +209403,26 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
209057
209403
|
return this;
|
|
209058
209404
|
};
|
|
209059
209405
|
if (typeof Symbol === "function") {
|
|
209060
|
-
|
|
209406
|
+
Readable7.prototype[Symbol.asyncIterator] = function() {
|
|
209061
209407
|
if (createReadableStreamAsyncIterator === undefined) {
|
|
209062
209408
|
createReadableStreamAsyncIterator = require_async_iterator();
|
|
209063
209409
|
}
|
|
209064
209410
|
return createReadableStreamAsyncIterator(this);
|
|
209065
209411
|
};
|
|
209066
209412
|
}
|
|
209067
|
-
Object.defineProperty(
|
|
209413
|
+
Object.defineProperty(Readable7.prototype, "readableHighWaterMark", {
|
|
209068
209414
|
enumerable: false,
|
|
209069
209415
|
get: function get() {
|
|
209070
209416
|
return this._readableState.highWaterMark;
|
|
209071
209417
|
}
|
|
209072
209418
|
});
|
|
209073
|
-
Object.defineProperty(
|
|
209419
|
+
Object.defineProperty(Readable7.prototype, "readableBuffer", {
|
|
209074
209420
|
enumerable: false,
|
|
209075
209421
|
get: function get() {
|
|
209076
209422
|
return this._readableState && this._readableState.buffer;
|
|
209077
209423
|
}
|
|
209078
209424
|
});
|
|
209079
|
-
Object.defineProperty(
|
|
209425
|
+
Object.defineProperty(Readable7.prototype, "readableFlowing", {
|
|
209080
209426
|
enumerable: false,
|
|
209081
209427
|
get: function get() {
|
|
209082
209428
|
return this._readableState.flowing;
|
|
@@ -209087,8 +209433,8 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
209087
209433
|
}
|
|
209088
209434
|
}
|
|
209089
209435
|
});
|
|
209090
|
-
|
|
209091
|
-
Object.defineProperty(
|
|
209436
|
+
Readable7._fromList = fromList;
|
|
209437
|
+
Object.defineProperty(Readable7.prototype, "readableLength", {
|
|
209092
209438
|
enumerable: false,
|
|
209093
209439
|
get: function get() {
|
|
209094
209440
|
return this._readableState.length;
|
|
@@ -209136,11 +209482,11 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
209136
209482
|
}
|
|
209137
209483
|
}
|
|
209138
209484
|
if (typeof Symbol === "function") {
|
|
209139
|
-
|
|
209485
|
+
Readable7.from = function(iterable, opts) {
|
|
209140
209486
|
if (from === undefined) {
|
|
209141
209487
|
from = require_from();
|
|
209142
209488
|
}
|
|
209143
|
-
return from(
|
|
209489
|
+
return from(Readable7, iterable, opts);
|
|
209144
209490
|
};
|
|
209145
209491
|
}
|
|
209146
209492
|
function indexOf(xs8, x10) {
|
|
@@ -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 };
|
|
@@ -241561,11 +241907,12 @@ var package_default = {
|
|
|
241561
241907
|
"@types/ejs": "^3.1.5",
|
|
241562
241908
|
"@types/express": "^5.0.6",
|
|
241563
241909
|
"@types/json-schema": "^7.0.15",
|
|
241564
|
-
"@types/lodash
|
|
241565
|
-
"@types/node": "^22.10.5",
|
|
241910
|
+
"@types/lodash": "^4.17.24",
|
|
241566
241911
|
"@types/multer": "^2.0.0",
|
|
241912
|
+
"@types/node": "^22.10.5",
|
|
241567
241913
|
"@vercel/detect-agent": "^1.1.0",
|
|
241568
241914
|
chalk: "^5.6.2",
|
|
241915
|
+
chokidar: "^5.0.0",
|
|
241569
241916
|
commander: "^12.1.0",
|
|
241570
241917
|
"common-tags": "^1.8.2",
|
|
241571
241918
|
cors: "^2.8.5",
|
|
@@ -241581,9 +241928,9 @@ var package_default = {
|
|
|
241581
241928
|
json5: "^2.2.3",
|
|
241582
241929
|
knip: "^5.83.1",
|
|
241583
241930
|
ky: "^1.14.2",
|
|
241584
|
-
|
|
241585
|
-
multer: "^2.0.0",
|
|
241931
|
+
lodash: "^4.17.23",
|
|
241586
241932
|
msw: "^2.12.10",
|
|
241933
|
+
multer: "^2.0.0",
|
|
241587
241934
|
nanoid: "^5.1.6",
|
|
241588
241935
|
open: "^11.0.0",
|
|
241589
241936
|
"p-wait-for": "^6.0.0",
|
|
@@ -242706,7 +243053,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
242706
243053
|
|
|
242707
243054
|
// src/cli/commands/project/create.ts
|
|
242708
243055
|
import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
|
|
242709
|
-
var
|
|
243056
|
+
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
242710
243057
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
242711
243058
|
async function getTemplateById(templateId) {
|
|
242712
243059
|
const templates = await listTemplates();
|
|
@@ -242750,7 +243097,7 @@ async function createInteractive(options) {
|
|
|
242750
243097
|
});
|
|
242751
243098
|
},
|
|
242752
243099
|
projectPath: async ({ results }) => {
|
|
242753
|
-
const suggestedPath = await isDirEmpty() ? "./" : `./${
|
|
243100
|
+
const suggestedPath = await isDirEmpty() ? "./" : `./${import_kebabCase.default(results.name)}`;
|
|
242754
243101
|
return Ze({
|
|
242755
243102
|
message: "Where should we create your project?",
|
|
242756
243103
|
placeholder: suggestedPath,
|
|
@@ -243513,6 +243860,7 @@ function getTypesCommand(context) {
|
|
|
243513
243860
|
}
|
|
243514
243861
|
|
|
243515
243862
|
// src/cli/dev/dev-server/main.ts
|
|
243863
|
+
import { dirname as dirname15, join as join18 } from "node:path";
|
|
243516
243864
|
var import_cors = __toESM(require_lib4(), 1);
|
|
243517
243865
|
var import_express4 = __toESM(require_express(), 1);
|
|
243518
243866
|
|
|
@@ -243735,6 +244083,10 @@ class FunctionManager {
|
|
|
243735
244083
|
this.setupProcessHandlers(name2, process21);
|
|
243736
244084
|
return this.waitForReady(name2, runningFunc);
|
|
243737
244085
|
}
|
|
244086
|
+
reload(functions) {
|
|
244087
|
+
this.stopAll();
|
|
244088
|
+
this.functions = new Map(functions.map((f7) => [f7.name, f7]));
|
|
244089
|
+
}
|
|
243738
244090
|
stopAll() {
|
|
243739
244091
|
for (const [name2, { process: process21 }] of this.running) {
|
|
243740
244092
|
this.logger.log(`[dev-server] Stopping function: ${name2}`);
|
|
@@ -243880,6 +244232,1690 @@ class Database {
|
|
|
243880
244232
|
}
|
|
243881
244233
|
}
|
|
243882
244234
|
|
|
244235
|
+
// src/cli/dev/dev-server/dir-watcher.ts
|
|
244236
|
+
import { dirname as dirname14 } from "node:path";
|
|
244237
|
+
|
|
244238
|
+
// node_modules/chokidar/index.js
|
|
244239
|
+
import { EventEmitter as EventEmitter3 } from "node:events";
|
|
244240
|
+
import { stat as statcb, Stats } from "node:fs";
|
|
244241
|
+
import { readdir as readdir3, stat as stat4 } from "node:fs/promises";
|
|
244242
|
+
import * as sp3 from "node:path";
|
|
244243
|
+
|
|
244244
|
+
// node_modules/readdirp/index.js
|
|
244245
|
+
import { lstat as lstat2, readdir as readdir2, realpath, stat as stat2 } from "node:fs/promises";
|
|
244246
|
+
import { join as pjoin, relative as prelative, resolve as presolve, sep as psep } from "node:path";
|
|
244247
|
+
import { Readable as Readable6 } from "node:stream";
|
|
244248
|
+
var EntryTypes = {
|
|
244249
|
+
FILE_TYPE: "files",
|
|
244250
|
+
DIR_TYPE: "directories",
|
|
244251
|
+
FILE_DIR_TYPE: "files_directories",
|
|
244252
|
+
EVERYTHING_TYPE: "all"
|
|
244253
|
+
};
|
|
244254
|
+
var defaultOptions = {
|
|
244255
|
+
root: ".",
|
|
244256
|
+
fileFilter: (_entryInfo) => true,
|
|
244257
|
+
directoryFilter: (_entryInfo) => true,
|
|
244258
|
+
type: EntryTypes.FILE_TYPE,
|
|
244259
|
+
lstat: false,
|
|
244260
|
+
depth: 2147483648,
|
|
244261
|
+
alwaysStat: false,
|
|
244262
|
+
highWaterMark: 4096
|
|
244263
|
+
};
|
|
244264
|
+
Object.freeze(defaultOptions);
|
|
244265
|
+
var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
|
|
244266
|
+
var NORMAL_FLOW_ERRORS = new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
|
|
244267
|
+
var ALL_TYPES = [
|
|
244268
|
+
EntryTypes.DIR_TYPE,
|
|
244269
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244270
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
244271
|
+
EntryTypes.FILE_TYPE
|
|
244272
|
+
];
|
|
244273
|
+
var DIR_TYPES = new Set([
|
|
244274
|
+
EntryTypes.DIR_TYPE,
|
|
244275
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244276
|
+
EntryTypes.FILE_DIR_TYPE
|
|
244277
|
+
]);
|
|
244278
|
+
var FILE_TYPES2 = new Set([
|
|
244279
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
244280
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
244281
|
+
EntryTypes.FILE_TYPE
|
|
244282
|
+
]);
|
|
244283
|
+
var isNormalFlowError = (error48) => NORMAL_FLOW_ERRORS.has(error48.code);
|
|
244284
|
+
var wantBigintFsStats = process.platform === "win32";
|
|
244285
|
+
var emptyFn = (_entryInfo) => true;
|
|
244286
|
+
var normalizeFilter = (filter2) => {
|
|
244287
|
+
if (filter2 === undefined)
|
|
244288
|
+
return emptyFn;
|
|
244289
|
+
if (typeof filter2 === "function")
|
|
244290
|
+
return filter2;
|
|
244291
|
+
if (typeof filter2 === "string") {
|
|
244292
|
+
const fl6 = filter2.trim();
|
|
244293
|
+
return (entry) => entry.basename === fl6;
|
|
244294
|
+
}
|
|
244295
|
+
if (Array.isArray(filter2)) {
|
|
244296
|
+
const trItems = filter2.map((item) => item.trim());
|
|
244297
|
+
return (entry) => trItems.some((f7) => entry.basename === f7);
|
|
244298
|
+
}
|
|
244299
|
+
return emptyFn;
|
|
244300
|
+
};
|
|
244301
|
+
|
|
244302
|
+
class ReaddirpStream extends Readable6 {
|
|
244303
|
+
parents;
|
|
244304
|
+
reading;
|
|
244305
|
+
parent;
|
|
244306
|
+
_stat;
|
|
244307
|
+
_maxDepth;
|
|
244308
|
+
_wantsDir;
|
|
244309
|
+
_wantsFile;
|
|
244310
|
+
_wantsEverything;
|
|
244311
|
+
_root;
|
|
244312
|
+
_isDirent;
|
|
244313
|
+
_statsProp;
|
|
244314
|
+
_rdOptions;
|
|
244315
|
+
_fileFilter;
|
|
244316
|
+
_directoryFilter;
|
|
244317
|
+
constructor(options8 = {}) {
|
|
244318
|
+
super({
|
|
244319
|
+
objectMode: true,
|
|
244320
|
+
autoDestroy: true,
|
|
244321
|
+
highWaterMark: options8.highWaterMark
|
|
244322
|
+
});
|
|
244323
|
+
const opts = { ...defaultOptions, ...options8 };
|
|
244324
|
+
const { root: root2, type } = opts;
|
|
244325
|
+
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
244326
|
+
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
244327
|
+
const statMethod = opts.lstat ? lstat2 : stat2;
|
|
244328
|
+
if (wantBigintFsStats) {
|
|
244329
|
+
this._stat = (path18) => statMethod(path18, { bigint: true });
|
|
244330
|
+
} else {
|
|
244331
|
+
this._stat = statMethod;
|
|
244332
|
+
}
|
|
244333
|
+
this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
|
|
244334
|
+
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
244335
|
+
this._wantsFile = type ? FILE_TYPES2.has(type) : false;
|
|
244336
|
+
this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
|
|
244337
|
+
this._root = presolve(root2);
|
|
244338
|
+
this._isDirent = !opts.alwaysStat;
|
|
244339
|
+
this._statsProp = this._isDirent ? "dirent" : "stats";
|
|
244340
|
+
this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
|
|
244341
|
+
this.parents = [this._exploreDir(root2, 1)];
|
|
244342
|
+
this.reading = false;
|
|
244343
|
+
this.parent = undefined;
|
|
244344
|
+
}
|
|
244345
|
+
async _read(batch) {
|
|
244346
|
+
if (this.reading)
|
|
244347
|
+
return;
|
|
244348
|
+
this.reading = true;
|
|
244349
|
+
try {
|
|
244350
|
+
while (!this.destroyed && batch > 0) {
|
|
244351
|
+
const par = this.parent;
|
|
244352
|
+
const fil = par && par.files;
|
|
244353
|
+
if (fil && fil.length > 0) {
|
|
244354
|
+
const { path: path18, depth } = par;
|
|
244355
|
+
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path18));
|
|
244356
|
+
const awaited = await Promise.all(slice);
|
|
244357
|
+
for (const entry of awaited) {
|
|
244358
|
+
if (!entry)
|
|
244359
|
+
continue;
|
|
244360
|
+
if (this.destroyed)
|
|
244361
|
+
return;
|
|
244362
|
+
const entryType = await this._getEntryType(entry);
|
|
244363
|
+
if (entryType === "directory" && this._directoryFilter(entry)) {
|
|
244364
|
+
if (depth <= this._maxDepth) {
|
|
244365
|
+
this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
|
244366
|
+
}
|
|
244367
|
+
if (this._wantsDir) {
|
|
244368
|
+
this.push(entry);
|
|
244369
|
+
batch--;
|
|
244370
|
+
}
|
|
244371
|
+
} else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
|
|
244372
|
+
if (this._wantsFile) {
|
|
244373
|
+
this.push(entry);
|
|
244374
|
+
batch--;
|
|
244375
|
+
}
|
|
244376
|
+
}
|
|
244377
|
+
}
|
|
244378
|
+
} else {
|
|
244379
|
+
const parent = this.parents.pop();
|
|
244380
|
+
if (!parent) {
|
|
244381
|
+
this.push(null);
|
|
244382
|
+
break;
|
|
244383
|
+
}
|
|
244384
|
+
this.parent = await parent;
|
|
244385
|
+
if (this.destroyed)
|
|
244386
|
+
return;
|
|
244387
|
+
}
|
|
244388
|
+
}
|
|
244389
|
+
} catch (error48) {
|
|
244390
|
+
this.destroy(error48);
|
|
244391
|
+
} finally {
|
|
244392
|
+
this.reading = false;
|
|
244393
|
+
}
|
|
244394
|
+
}
|
|
244395
|
+
async _exploreDir(path18, depth) {
|
|
244396
|
+
let files;
|
|
244397
|
+
try {
|
|
244398
|
+
files = await readdir2(path18, this._rdOptions);
|
|
244399
|
+
} catch (error48) {
|
|
244400
|
+
this._onError(error48);
|
|
244401
|
+
}
|
|
244402
|
+
return { files, depth, path: path18 };
|
|
244403
|
+
}
|
|
244404
|
+
async _formatEntry(dirent, path18) {
|
|
244405
|
+
let entry;
|
|
244406
|
+
const basename4 = this._isDirent ? dirent.name : dirent;
|
|
244407
|
+
try {
|
|
244408
|
+
const fullPath = presolve(pjoin(path18, basename4));
|
|
244409
|
+
entry = { path: prelative(this._root, fullPath), fullPath, basename: basename4 };
|
|
244410
|
+
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
244411
|
+
} catch (err) {
|
|
244412
|
+
this._onError(err);
|
|
244413
|
+
return;
|
|
244414
|
+
}
|
|
244415
|
+
return entry;
|
|
244416
|
+
}
|
|
244417
|
+
_onError(err) {
|
|
244418
|
+
if (isNormalFlowError(err) && !this.destroyed) {
|
|
244419
|
+
this.emit("warn", err);
|
|
244420
|
+
} else {
|
|
244421
|
+
this.destroy(err);
|
|
244422
|
+
}
|
|
244423
|
+
}
|
|
244424
|
+
async _getEntryType(entry) {
|
|
244425
|
+
if (!entry && this._statsProp in entry) {
|
|
244426
|
+
return "";
|
|
244427
|
+
}
|
|
244428
|
+
const stats = entry[this._statsProp];
|
|
244429
|
+
if (stats.isFile())
|
|
244430
|
+
return "file";
|
|
244431
|
+
if (stats.isDirectory())
|
|
244432
|
+
return "directory";
|
|
244433
|
+
if (stats && stats.isSymbolicLink()) {
|
|
244434
|
+
const full = entry.fullPath;
|
|
244435
|
+
try {
|
|
244436
|
+
const entryRealPath = await realpath(full);
|
|
244437
|
+
const entryRealPathStats = await lstat2(entryRealPath);
|
|
244438
|
+
if (entryRealPathStats.isFile()) {
|
|
244439
|
+
return "file";
|
|
244440
|
+
}
|
|
244441
|
+
if (entryRealPathStats.isDirectory()) {
|
|
244442
|
+
const len = entryRealPath.length;
|
|
244443
|
+
if (full.startsWith(entryRealPath) && full.substr(len, 1) === psep) {
|
|
244444
|
+
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
244445
|
+
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
244446
|
+
return this._onError(recursiveError);
|
|
244447
|
+
}
|
|
244448
|
+
return "directory";
|
|
244449
|
+
}
|
|
244450
|
+
} catch (error48) {
|
|
244451
|
+
this._onError(error48);
|
|
244452
|
+
return "";
|
|
244453
|
+
}
|
|
244454
|
+
}
|
|
244455
|
+
}
|
|
244456
|
+
_includeAsFile(entry) {
|
|
244457
|
+
const stats = entry && entry[this._statsProp];
|
|
244458
|
+
return stats && this._wantsEverything && !stats.isDirectory();
|
|
244459
|
+
}
|
|
244460
|
+
}
|
|
244461
|
+
function readdirp(root2, options8 = {}) {
|
|
244462
|
+
let type = options8.entryType || options8.type;
|
|
244463
|
+
if (type === "both")
|
|
244464
|
+
type = EntryTypes.FILE_DIR_TYPE;
|
|
244465
|
+
if (type)
|
|
244466
|
+
options8.type = type;
|
|
244467
|
+
if (!root2) {
|
|
244468
|
+
throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
|
|
244469
|
+
} else if (typeof root2 !== "string") {
|
|
244470
|
+
throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
|
|
244471
|
+
} else if (type && !ALL_TYPES.includes(type)) {
|
|
244472
|
+
throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
|
|
244473
|
+
}
|
|
244474
|
+
options8.root = root2;
|
|
244475
|
+
return new ReaddirpStream(options8);
|
|
244476
|
+
}
|
|
244477
|
+
|
|
244478
|
+
// node_modules/chokidar/handler.js
|
|
244479
|
+
import { watch as fs_watch, unwatchFile, watchFile } from "node:fs";
|
|
244480
|
+
import { realpath as fsrealpath, lstat as lstat3, open as open2, stat as stat3 } from "node:fs/promises";
|
|
244481
|
+
import { type as osType } from "node:os";
|
|
244482
|
+
import * as sp2 from "node:path";
|
|
244483
|
+
var STR_DATA = "data";
|
|
244484
|
+
var STR_END = "end";
|
|
244485
|
+
var STR_CLOSE = "close";
|
|
244486
|
+
var EMPTY_FN = () => {};
|
|
244487
|
+
var pl6 = process.platform;
|
|
244488
|
+
var isWindows4 = pl6 === "win32";
|
|
244489
|
+
var isMacos = pl6 === "darwin";
|
|
244490
|
+
var isLinux = pl6 === "linux";
|
|
244491
|
+
var isFreeBSD = pl6 === "freebsd";
|
|
244492
|
+
var isIBMi = osType() === "OS400";
|
|
244493
|
+
var EVENTS = {
|
|
244494
|
+
ALL: "all",
|
|
244495
|
+
READY: "ready",
|
|
244496
|
+
ADD: "add",
|
|
244497
|
+
CHANGE: "change",
|
|
244498
|
+
ADD_DIR: "addDir",
|
|
244499
|
+
UNLINK: "unlink",
|
|
244500
|
+
UNLINK_DIR: "unlinkDir",
|
|
244501
|
+
RAW: "raw",
|
|
244502
|
+
ERROR: "error"
|
|
244503
|
+
};
|
|
244504
|
+
var EV = EVENTS;
|
|
244505
|
+
var THROTTLE_MODE_WATCH = "watch";
|
|
244506
|
+
var statMethods = { lstat: lstat3, stat: stat3 };
|
|
244507
|
+
var KEY_LISTENERS = "listeners";
|
|
244508
|
+
var KEY_ERR = "errHandlers";
|
|
244509
|
+
var KEY_RAW = "rawEmitters";
|
|
244510
|
+
var HANDLER_KEYS2 = [KEY_LISTENERS, KEY_ERR, KEY_RAW];
|
|
244511
|
+
var binaryExtensions = new Set([
|
|
244512
|
+
"3dm",
|
|
244513
|
+
"3ds",
|
|
244514
|
+
"3g2",
|
|
244515
|
+
"3gp",
|
|
244516
|
+
"7z",
|
|
244517
|
+
"a",
|
|
244518
|
+
"aac",
|
|
244519
|
+
"adp",
|
|
244520
|
+
"afdesign",
|
|
244521
|
+
"afphoto",
|
|
244522
|
+
"afpub",
|
|
244523
|
+
"ai",
|
|
244524
|
+
"aif",
|
|
244525
|
+
"aiff",
|
|
244526
|
+
"alz",
|
|
244527
|
+
"ape",
|
|
244528
|
+
"apk",
|
|
244529
|
+
"appimage",
|
|
244530
|
+
"ar",
|
|
244531
|
+
"arj",
|
|
244532
|
+
"asf",
|
|
244533
|
+
"au",
|
|
244534
|
+
"avi",
|
|
244535
|
+
"bak",
|
|
244536
|
+
"baml",
|
|
244537
|
+
"bh",
|
|
244538
|
+
"bin",
|
|
244539
|
+
"bk",
|
|
244540
|
+
"bmp",
|
|
244541
|
+
"btif",
|
|
244542
|
+
"bz2",
|
|
244543
|
+
"bzip2",
|
|
244544
|
+
"cab",
|
|
244545
|
+
"caf",
|
|
244546
|
+
"cgm",
|
|
244547
|
+
"class",
|
|
244548
|
+
"cmx",
|
|
244549
|
+
"cpio",
|
|
244550
|
+
"cr2",
|
|
244551
|
+
"cur",
|
|
244552
|
+
"dat",
|
|
244553
|
+
"dcm",
|
|
244554
|
+
"deb",
|
|
244555
|
+
"dex",
|
|
244556
|
+
"djvu",
|
|
244557
|
+
"dll",
|
|
244558
|
+
"dmg",
|
|
244559
|
+
"dng",
|
|
244560
|
+
"doc",
|
|
244561
|
+
"docm",
|
|
244562
|
+
"docx",
|
|
244563
|
+
"dot",
|
|
244564
|
+
"dotm",
|
|
244565
|
+
"dra",
|
|
244566
|
+
"DS_Store",
|
|
244567
|
+
"dsk",
|
|
244568
|
+
"dts",
|
|
244569
|
+
"dtshd",
|
|
244570
|
+
"dvb",
|
|
244571
|
+
"dwg",
|
|
244572
|
+
"dxf",
|
|
244573
|
+
"ecelp4800",
|
|
244574
|
+
"ecelp7470",
|
|
244575
|
+
"ecelp9600",
|
|
244576
|
+
"egg",
|
|
244577
|
+
"eol",
|
|
244578
|
+
"eot",
|
|
244579
|
+
"epub",
|
|
244580
|
+
"exe",
|
|
244581
|
+
"f4v",
|
|
244582
|
+
"fbs",
|
|
244583
|
+
"fh",
|
|
244584
|
+
"fla",
|
|
244585
|
+
"flac",
|
|
244586
|
+
"flatpak",
|
|
244587
|
+
"fli",
|
|
244588
|
+
"flv",
|
|
244589
|
+
"fpx",
|
|
244590
|
+
"fst",
|
|
244591
|
+
"fvt",
|
|
244592
|
+
"g3",
|
|
244593
|
+
"gh",
|
|
244594
|
+
"gif",
|
|
244595
|
+
"graffle",
|
|
244596
|
+
"gz",
|
|
244597
|
+
"gzip",
|
|
244598
|
+
"h261",
|
|
244599
|
+
"h263",
|
|
244600
|
+
"h264",
|
|
244601
|
+
"icns",
|
|
244602
|
+
"ico",
|
|
244603
|
+
"ief",
|
|
244604
|
+
"img",
|
|
244605
|
+
"ipa",
|
|
244606
|
+
"iso",
|
|
244607
|
+
"jar",
|
|
244608
|
+
"jpeg",
|
|
244609
|
+
"jpg",
|
|
244610
|
+
"jpgv",
|
|
244611
|
+
"jpm",
|
|
244612
|
+
"jxr",
|
|
244613
|
+
"key",
|
|
244614
|
+
"ktx",
|
|
244615
|
+
"lha",
|
|
244616
|
+
"lib",
|
|
244617
|
+
"lvp",
|
|
244618
|
+
"lz",
|
|
244619
|
+
"lzh",
|
|
244620
|
+
"lzma",
|
|
244621
|
+
"lzo",
|
|
244622
|
+
"m3u",
|
|
244623
|
+
"m4a",
|
|
244624
|
+
"m4v",
|
|
244625
|
+
"mar",
|
|
244626
|
+
"mdi",
|
|
244627
|
+
"mht",
|
|
244628
|
+
"mid",
|
|
244629
|
+
"midi",
|
|
244630
|
+
"mj2",
|
|
244631
|
+
"mka",
|
|
244632
|
+
"mkv",
|
|
244633
|
+
"mmr",
|
|
244634
|
+
"mng",
|
|
244635
|
+
"mobi",
|
|
244636
|
+
"mov",
|
|
244637
|
+
"movie",
|
|
244638
|
+
"mp3",
|
|
244639
|
+
"mp4",
|
|
244640
|
+
"mp4a",
|
|
244641
|
+
"mpeg",
|
|
244642
|
+
"mpg",
|
|
244643
|
+
"mpga",
|
|
244644
|
+
"mxu",
|
|
244645
|
+
"nef",
|
|
244646
|
+
"npx",
|
|
244647
|
+
"numbers",
|
|
244648
|
+
"nupkg",
|
|
244649
|
+
"o",
|
|
244650
|
+
"odp",
|
|
244651
|
+
"ods",
|
|
244652
|
+
"odt",
|
|
244653
|
+
"oga",
|
|
244654
|
+
"ogg",
|
|
244655
|
+
"ogv",
|
|
244656
|
+
"otf",
|
|
244657
|
+
"ott",
|
|
244658
|
+
"pages",
|
|
244659
|
+
"pbm",
|
|
244660
|
+
"pcx",
|
|
244661
|
+
"pdb",
|
|
244662
|
+
"pdf",
|
|
244663
|
+
"pea",
|
|
244664
|
+
"pgm",
|
|
244665
|
+
"pic",
|
|
244666
|
+
"png",
|
|
244667
|
+
"pnm",
|
|
244668
|
+
"pot",
|
|
244669
|
+
"potm",
|
|
244670
|
+
"potx",
|
|
244671
|
+
"ppa",
|
|
244672
|
+
"ppam",
|
|
244673
|
+
"ppm",
|
|
244674
|
+
"pps",
|
|
244675
|
+
"ppsm",
|
|
244676
|
+
"ppsx",
|
|
244677
|
+
"ppt",
|
|
244678
|
+
"pptm",
|
|
244679
|
+
"pptx",
|
|
244680
|
+
"psd",
|
|
244681
|
+
"pya",
|
|
244682
|
+
"pyc",
|
|
244683
|
+
"pyo",
|
|
244684
|
+
"pyv",
|
|
244685
|
+
"qt",
|
|
244686
|
+
"rar",
|
|
244687
|
+
"ras",
|
|
244688
|
+
"raw",
|
|
244689
|
+
"resources",
|
|
244690
|
+
"rgb",
|
|
244691
|
+
"rip",
|
|
244692
|
+
"rlc",
|
|
244693
|
+
"rmf",
|
|
244694
|
+
"rmvb",
|
|
244695
|
+
"rpm",
|
|
244696
|
+
"rtf",
|
|
244697
|
+
"rz",
|
|
244698
|
+
"s3m",
|
|
244699
|
+
"s7z",
|
|
244700
|
+
"scpt",
|
|
244701
|
+
"sgi",
|
|
244702
|
+
"shar",
|
|
244703
|
+
"snap",
|
|
244704
|
+
"sil",
|
|
244705
|
+
"sketch",
|
|
244706
|
+
"slk",
|
|
244707
|
+
"smv",
|
|
244708
|
+
"snk",
|
|
244709
|
+
"so",
|
|
244710
|
+
"stl",
|
|
244711
|
+
"suo",
|
|
244712
|
+
"sub",
|
|
244713
|
+
"swf",
|
|
244714
|
+
"tar",
|
|
244715
|
+
"tbz",
|
|
244716
|
+
"tbz2",
|
|
244717
|
+
"tga",
|
|
244718
|
+
"tgz",
|
|
244719
|
+
"thmx",
|
|
244720
|
+
"tif",
|
|
244721
|
+
"tiff",
|
|
244722
|
+
"tlz",
|
|
244723
|
+
"ttc",
|
|
244724
|
+
"ttf",
|
|
244725
|
+
"txz",
|
|
244726
|
+
"udf",
|
|
244727
|
+
"uvh",
|
|
244728
|
+
"uvi",
|
|
244729
|
+
"uvm",
|
|
244730
|
+
"uvp",
|
|
244731
|
+
"uvs",
|
|
244732
|
+
"uvu",
|
|
244733
|
+
"viv",
|
|
244734
|
+
"vob",
|
|
244735
|
+
"war",
|
|
244736
|
+
"wav",
|
|
244737
|
+
"wax",
|
|
244738
|
+
"wbmp",
|
|
244739
|
+
"wdp",
|
|
244740
|
+
"weba",
|
|
244741
|
+
"webm",
|
|
244742
|
+
"webp",
|
|
244743
|
+
"whl",
|
|
244744
|
+
"wim",
|
|
244745
|
+
"wm",
|
|
244746
|
+
"wma",
|
|
244747
|
+
"wmv",
|
|
244748
|
+
"wmx",
|
|
244749
|
+
"woff",
|
|
244750
|
+
"woff2",
|
|
244751
|
+
"wrm",
|
|
244752
|
+
"wvx",
|
|
244753
|
+
"xbm",
|
|
244754
|
+
"xif",
|
|
244755
|
+
"xla",
|
|
244756
|
+
"xlam",
|
|
244757
|
+
"xls",
|
|
244758
|
+
"xlsb",
|
|
244759
|
+
"xlsm",
|
|
244760
|
+
"xlsx",
|
|
244761
|
+
"xlt",
|
|
244762
|
+
"xltm",
|
|
244763
|
+
"xltx",
|
|
244764
|
+
"xm",
|
|
244765
|
+
"xmind",
|
|
244766
|
+
"xpi",
|
|
244767
|
+
"xpm",
|
|
244768
|
+
"xwd",
|
|
244769
|
+
"xz",
|
|
244770
|
+
"z",
|
|
244771
|
+
"zip",
|
|
244772
|
+
"zipx"
|
|
244773
|
+
]);
|
|
244774
|
+
var isBinaryPath = (filePath) => binaryExtensions.has(sp2.extname(filePath).slice(1).toLowerCase());
|
|
244775
|
+
var foreach = (val, fn9) => {
|
|
244776
|
+
if (val instanceof Set) {
|
|
244777
|
+
val.forEach(fn9);
|
|
244778
|
+
} else {
|
|
244779
|
+
fn9(val);
|
|
244780
|
+
}
|
|
244781
|
+
};
|
|
244782
|
+
var addAndConvert = (main, prop, item) => {
|
|
244783
|
+
let container = main[prop];
|
|
244784
|
+
if (!(container instanceof Set)) {
|
|
244785
|
+
main[prop] = container = new Set([container]);
|
|
244786
|
+
}
|
|
244787
|
+
container.add(item);
|
|
244788
|
+
};
|
|
244789
|
+
var clearItem = (cont) => (key2) => {
|
|
244790
|
+
const set2 = cont[key2];
|
|
244791
|
+
if (set2 instanceof Set) {
|
|
244792
|
+
set2.clear();
|
|
244793
|
+
} else {
|
|
244794
|
+
delete cont[key2];
|
|
244795
|
+
}
|
|
244796
|
+
};
|
|
244797
|
+
var delFromSet = (main, prop, item) => {
|
|
244798
|
+
const container = main[prop];
|
|
244799
|
+
if (container instanceof Set) {
|
|
244800
|
+
container.delete(item);
|
|
244801
|
+
} else if (container === item) {
|
|
244802
|
+
delete main[prop];
|
|
244803
|
+
}
|
|
244804
|
+
};
|
|
244805
|
+
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
244806
|
+
var FsWatchInstances = new Map;
|
|
244807
|
+
function createFsWatchInstance(path18, options8, listener, errHandler, emitRaw) {
|
|
244808
|
+
const handleEvent = (rawEvent, evPath) => {
|
|
244809
|
+
listener(path18);
|
|
244810
|
+
emitRaw(rawEvent, evPath, { watchedPath: path18 });
|
|
244811
|
+
if (evPath && path18 !== evPath) {
|
|
244812
|
+
fsWatchBroadcast(sp2.resolve(path18, evPath), KEY_LISTENERS, sp2.join(path18, evPath));
|
|
244813
|
+
}
|
|
244814
|
+
};
|
|
244815
|
+
try {
|
|
244816
|
+
return fs_watch(path18, {
|
|
244817
|
+
persistent: options8.persistent
|
|
244818
|
+
}, handleEvent);
|
|
244819
|
+
} catch (error48) {
|
|
244820
|
+
errHandler(error48);
|
|
244821
|
+
return;
|
|
244822
|
+
}
|
|
244823
|
+
}
|
|
244824
|
+
var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
|
|
244825
|
+
const cont = FsWatchInstances.get(fullPath);
|
|
244826
|
+
if (!cont)
|
|
244827
|
+
return;
|
|
244828
|
+
foreach(cont[listenerType], (listener) => {
|
|
244829
|
+
listener(val1, val2, val3);
|
|
244830
|
+
});
|
|
244831
|
+
};
|
|
244832
|
+
var setFsWatchListener = (path18, fullPath, options8, handlers) => {
|
|
244833
|
+
const { listener, errHandler, rawEmitter } = handlers;
|
|
244834
|
+
let cont = FsWatchInstances.get(fullPath);
|
|
244835
|
+
let watcher;
|
|
244836
|
+
if (!options8.persistent) {
|
|
244837
|
+
watcher = createFsWatchInstance(path18, options8, listener, errHandler, rawEmitter);
|
|
244838
|
+
if (!watcher)
|
|
244839
|
+
return;
|
|
244840
|
+
return watcher.close.bind(watcher);
|
|
244841
|
+
}
|
|
244842
|
+
if (cont) {
|
|
244843
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
244844
|
+
addAndConvert(cont, KEY_ERR, errHandler);
|
|
244845
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
244846
|
+
} else {
|
|
244847
|
+
watcher = createFsWatchInstance(path18, options8, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
|
|
244848
|
+
if (!watcher)
|
|
244849
|
+
return;
|
|
244850
|
+
watcher.on(EV.ERROR, async (error48) => {
|
|
244851
|
+
const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
|
|
244852
|
+
if (cont)
|
|
244853
|
+
cont.watcherUnusable = true;
|
|
244854
|
+
if (isWindows4 && error48.code === "EPERM") {
|
|
244855
|
+
try {
|
|
244856
|
+
const fd = await open2(path18, "r");
|
|
244857
|
+
await fd.close();
|
|
244858
|
+
broadcastErr(error48);
|
|
244859
|
+
} catch (err) {}
|
|
244860
|
+
} else {
|
|
244861
|
+
broadcastErr(error48);
|
|
244862
|
+
}
|
|
244863
|
+
});
|
|
244864
|
+
cont = {
|
|
244865
|
+
listeners: listener,
|
|
244866
|
+
errHandlers: errHandler,
|
|
244867
|
+
rawEmitters: rawEmitter,
|
|
244868
|
+
watcher
|
|
244869
|
+
};
|
|
244870
|
+
FsWatchInstances.set(fullPath, cont);
|
|
244871
|
+
}
|
|
244872
|
+
return () => {
|
|
244873
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
244874
|
+
delFromSet(cont, KEY_ERR, errHandler);
|
|
244875
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
244876
|
+
if (isEmptySet(cont.listeners)) {
|
|
244877
|
+
cont.watcher.close();
|
|
244878
|
+
FsWatchInstances.delete(fullPath);
|
|
244879
|
+
HANDLER_KEYS2.forEach(clearItem(cont));
|
|
244880
|
+
cont.watcher = undefined;
|
|
244881
|
+
Object.freeze(cont);
|
|
244882
|
+
}
|
|
244883
|
+
};
|
|
244884
|
+
};
|
|
244885
|
+
var FsWatchFileInstances = new Map;
|
|
244886
|
+
var setFsWatchFileListener = (path18, fullPath, options8, handlers) => {
|
|
244887
|
+
const { listener, rawEmitter } = handlers;
|
|
244888
|
+
let cont = FsWatchFileInstances.get(fullPath);
|
|
244889
|
+
const copts = cont && cont.options;
|
|
244890
|
+
if (copts && (copts.persistent < options8.persistent || copts.interval > options8.interval)) {
|
|
244891
|
+
unwatchFile(fullPath);
|
|
244892
|
+
cont = undefined;
|
|
244893
|
+
}
|
|
244894
|
+
if (cont) {
|
|
244895
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
244896
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
244897
|
+
} else {
|
|
244898
|
+
cont = {
|
|
244899
|
+
listeners: listener,
|
|
244900
|
+
rawEmitters: rawEmitter,
|
|
244901
|
+
options: options8,
|
|
244902
|
+
watcher: watchFile(fullPath, options8, (curr, prev) => {
|
|
244903
|
+
foreach(cont.rawEmitters, (rawEmitter2) => {
|
|
244904
|
+
rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
|
|
244905
|
+
});
|
|
244906
|
+
const currmtime = curr.mtimeMs;
|
|
244907
|
+
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
244908
|
+
foreach(cont.listeners, (listener2) => listener2(path18, curr));
|
|
244909
|
+
}
|
|
244910
|
+
})
|
|
244911
|
+
};
|
|
244912
|
+
FsWatchFileInstances.set(fullPath, cont);
|
|
244913
|
+
}
|
|
244914
|
+
return () => {
|
|
244915
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
244916
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
244917
|
+
if (isEmptySet(cont.listeners)) {
|
|
244918
|
+
FsWatchFileInstances.delete(fullPath);
|
|
244919
|
+
unwatchFile(fullPath);
|
|
244920
|
+
cont.options = cont.watcher = undefined;
|
|
244921
|
+
Object.freeze(cont);
|
|
244922
|
+
}
|
|
244923
|
+
};
|
|
244924
|
+
};
|
|
244925
|
+
|
|
244926
|
+
class NodeFsHandler {
|
|
244927
|
+
fsw;
|
|
244928
|
+
_boundHandleError;
|
|
244929
|
+
constructor(fsW) {
|
|
244930
|
+
this.fsw = fsW;
|
|
244931
|
+
this._boundHandleError = (error48) => fsW._handleError(error48);
|
|
244932
|
+
}
|
|
244933
|
+
_watchWithNodeFs(path18, listener) {
|
|
244934
|
+
const opts = this.fsw.options;
|
|
244935
|
+
const directory = sp2.dirname(path18);
|
|
244936
|
+
const basename5 = sp2.basename(path18);
|
|
244937
|
+
const parent = this.fsw._getWatchedDir(directory);
|
|
244938
|
+
parent.add(basename5);
|
|
244939
|
+
const absolutePath = sp2.resolve(path18);
|
|
244940
|
+
const options8 = {
|
|
244941
|
+
persistent: opts.persistent
|
|
244942
|
+
};
|
|
244943
|
+
if (!listener)
|
|
244944
|
+
listener = EMPTY_FN;
|
|
244945
|
+
let closer;
|
|
244946
|
+
if (opts.usePolling) {
|
|
244947
|
+
const enableBin = opts.interval !== opts.binaryInterval;
|
|
244948
|
+
options8.interval = enableBin && isBinaryPath(basename5) ? opts.binaryInterval : opts.interval;
|
|
244949
|
+
closer = setFsWatchFileListener(path18, absolutePath, options8, {
|
|
244950
|
+
listener,
|
|
244951
|
+
rawEmitter: this.fsw._emitRaw
|
|
244952
|
+
});
|
|
244953
|
+
} else {
|
|
244954
|
+
closer = setFsWatchListener(path18, absolutePath, options8, {
|
|
244955
|
+
listener,
|
|
244956
|
+
errHandler: this._boundHandleError,
|
|
244957
|
+
rawEmitter: this.fsw._emitRaw
|
|
244958
|
+
});
|
|
244959
|
+
}
|
|
244960
|
+
return closer;
|
|
244961
|
+
}
|
|
244962
|
+
_handleFile(file2, stats, initialAdd) {
|
|
244963
|
+
if (this.fsw.closed) {
|
|
244964
|
+
return;
|
|
244965
|
+
}
|
|
244966
|
+
const dirname13 = sp2.dirname(file2);
|
|
244967
|
+
const basename5 = sp2.basename(file2);
|
|
244968
|
+
const parent = this.fsw._getWatchedDir(dirname13);
|
|
244969
|
+
let prevStats = stats;
|
|
244970
|
+
if (parent.has(basename5))
|
|
244971
|
+
return;
|
|
244972
|
+
const listener = async (path18, newStats) => {
|
|
244973
|
+
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file2, 5))
|
|
244974
|
+
return;
|
|
244975
|
+
if (!newStats || newStats.mtimeMs === 0) {
|
|
244976
|
+
try {
|
|
244977
|
+
const newStats2 = await stat3(file2);
|
|
244978
|
+
if (this.fsw.closed)
|
|
244979
|
+
return;
|
|
244980
|
+
const at13 = newStats2.atimeMs;
|
|
244981
|
+
const mt12 = newStats2.mtimeMs;
|
|
244982
|
+
if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
|
|
244983
|
+
this.fsw._emit(EV.CHANGE, file2, newStats2);
|
|
244984
|
+
}
|
|
244985
|
+
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
|
|
244986
|
+
this.fsw._closeFile(path18);
|
|
244987
|
+
prevStats = newStats2;
|
|
244988
|
+
const closer2 = this._watchWithNodeFs(file2, listener);
|
|
244989
|
+
if (closer2)
|
|
244990
|
+
this.fsw._addPathCloser(path18, closer2);
|
|
244991
|
+
} else {
|
|
244992
|
+
prevStats = newStats2;
|
|
244993
|
+
}
|
|
244994
|
+
} catch (error48) {
|
|
244995
|
+
this.fsw._remove(dirname13, basename5);
|
|
244996
|
+
}
|
|
244997
|
+
} else if (parent.has(basename5)) {
|
|
244998
|
+
const at13 = newStats.atimeMs;
|
|
244999
|
+
const mt12 = newStats.mtimeMs;
|
|
245000
|
+
if (!at13 || at13 <= mt12 || mt12 !== prevStats.mtimeMs) {
|
|
245001
|
+
this.fsw._emit(EV.CHANGE, file2, newStats);
|
|
245002
|
+
}
|
|
245003
|
+
prevStats = newStats;
|
|
245004
|
+
}
|
|
245005
|
+
};
|
|
245006
|
+
const closer = this._watchWithNodeFs(file2, listener);
|
|
245007
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file2)) {
|
|
245008
|
+
if (!this.fsw._throttle(EV.ADD, file2, 0))
|
|
245009
|
+
return;
|
|
245010
|
+
this.fsw._emit(EV.ADD, file2, stats);
|
|
245011
|
+
}
|
|
245012
|
+
return closer;
|
|
245013
|
+
}
|
|
245014
|
+
async _handleSymlink(entry, directory, path18, item) {
|
|
245015
|
+
if (this.fsw.closed) {
|
|
245016
|
+
return;
|
|
245017
|
+
}
|
|
245018
|
+
const full = entry.fullPath;
|
|
245019
|
+
const dir = this.fsw._getWatchedDir(directory);
|
|
245020
|
+
if (!this.fsw.options.followSymlinks) {
|
|
245021
|
+
this.fsw._incrReadyCount();
|
|
245022
|
+
let linkPath;
|
|
245023
|
+
try {
|
|
245024
|
+
linkPath = await fsrealpath(path18);
|
|
245025
|
+
} catch (e8) {
|
|
245026
|
+
this.fsw._emitReady();
|
|
245027
|
+
return true;
|
|
245028
|
+
}
|
|
245029
|
+
if (this.fsw.closed)
|
|
245030
|
+
return;
|
|
245031
|
+
if (dir.has(item)) {
|
|
245032
|
+
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
245033
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
245034
|
+
this.fsw._emit(EV.CHANGE, path18, entry.stats);
|
|
245035
|
+
}
|
|
245036
|
+
} else {
|
|
245037
|
+
dir.add(item);
|
|
245038
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
245039
|
+
this.fsw._emit(EV.ADD, path18, entry.stats);
|
|
245040
|
+
}
|
|
245041
|
+
this.fsw._emitReady();
|
|
245042
|
+
return true;
|
|
245043
|
+
}
|
|
245044
|
+
if (this.fsw._symlinkPaths.has(full)) {
|
|
245045
|
+
return true;
|
|
245046
|
+
}
|
|
245047
|
+
this.fsw._symlinkPaths.set(full, true);
|
|
245048
|
+
}
|
|
245049
|
+
_handleRead(directory, initialAdd, wh2, target, dir, depth, throttler) {
|
|
245050
|
+
directory = sp2.join(directory, "");
|
|
245051
|
+
const throttleKey = target ? `${directory}:${target}` : directory;
|
|
245052
|
+
throttler = this.fsw._throttle("readdir", throttleKey, 1000);
|
|
245053
|
+
if (!throttler)
|
|
245054
|
+
return;
|
|
245055
|
+
const previous = this.fsw._getWatchedDir(wh2.path);
|
|
245056
|
+
const current = new Set;
|
|
245057
|
+
let stream = this.fsw._readdirp(directory, {
|
|
245058
|
+
fileFilter: (entry) => wh2.filterPath(entry),
|
|
245059
|
+
directoryFilter: (entry) => wh2.filterDir(entry)
|
|
245060
|
+
});
|
|
245061
|
+
if (!stream)
|
|
245062
|
+
return;
|
|
245063
|
+
stream.on(STR_DATA, async (entry) => {
|
|
245064
|
+
if (this.fsw.closed) {
|
|
245065
|
+
stream = undefined;
|
|
245066
|
+
return;
|
|
245067
|
+
}
|
|
245068
|
+
const item = entry.path;
|
|
245069
|
+
let path18 = sp2.join(directory, item);
|
|
245070
|
+
current.add(item);
|
|
245071
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path18, item)) {
|
|
245072
|
+
return;
|
|
245073
|
+
}
|
|
245074
|
+
if (this.fsw.closed) {
|
|
245075
|
+
stream = undefined;
|
|
245076
|
+
return;
|
|
245077
|
+
}
|
|
245078
|
+
if (item === target || !target && !previous.has(item)) {
|
|
245079
|
+
this.fsw._incrReadyCount();
|
|
245080
|
+
path18 = sp2.join(dir, sp2.relative(dir, path18));
|
|
245081
|
+
this._addToNodeFs(path18, initialAdd, wh2, depth + 1);
|
|
245082
|
+
}
|
|
245083
|
+
}).on(EV.ERROR, this._boundHandleError);
|
|
245084
|
+
return new Promise((resolve7, reject) => {
|
|
245085
|
+
if (!stream)
|
|
245086
|
+
return reject();
|
|
245087
|
+
stream.once(STR_END, () => {
|
|
245088
|
+
if (this.fsw.closed) {
|
|
245089
|
+
stream = undefined;
|
|
245090
|
+
return;
|
|
245091
|
+
}
|
|
245092
|
+
const wasThrottled = throttler ? throttler.clear() : false;
|
|
245093
|
+
resolve7(undefined);
|
|
245094
|
+
previous.getChildren().filter((item) => {
|
|
245095
|
+
return item !== directory && !current.has(item);
|
|
245096
|
+
}).forEach((item) => {
|
|
245097
|
+
this.fsw._remove(directory, item);
|
|
245098
|
+
});
|
|
245099
|
+
stream = undefined;
|
|
245100
|
+
if (wasThrottled)
|
|
245101
|
+
this._handleRead(directory, false, wh2, target, dir, depth, throttler);
|
|
245102
|
+
});
|
|
245103
|
+
});
|
|
245104
|
+
}
|
|
245105
|
+
async _handleDir(dir, stats, initialAdd, depth, target, wh2, realpath2) {
|
|
245106
|
+
const parentDir = this.fsw._getWatchedDir(sp2.dirname(dir));
|
|
245107
|
+
const tracked = parentDir.has(sp2.basename(dir));
|
|
245108
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
|
|
245109
|
+
this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
245110
|
+
}
|
|
245111
|
+
parentDir.add(sp2.basename(dir));
|
|
245112
|
+
this.fsw._getWatchedDir(dir);
|
|
245113
|
+
let throttler;
|
|
245114
|
+
let closer;
|
|
245115
|
+
const oDepth = this.fsw.options.depth;
|
|
245116
|
+
if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
|
|
245117
|
+
if (!target) {
|
|
245118
|
+
await this._handleRead(dir, initialAdd, wh2, target, dir, depth, throttler);
|
|
245119
|
+
if (this.fsw.closed)
|
|
245120
|
+
return;
|
|
245121
|
+
}
|
|
245122
|
+
closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
|
|
245123
|
+
if (stats2 && stats2.mtimeMs === 0)
|
|
245124
|
+
return;
|
|
245125
|
+
this._handleRead(dirPath, false, wh2, target, dir, depth, throttler);
|
|
245126
|
+
});
|
|
245127
|
+
}
|
|
245128
|
+
return closer;
|
|
245129
|
+
}
|
|
245130
|
+
async _addToNodeFs(path18, initialAdd, priorWh, depth, target) {
|
|
245131
|
+
const ready = this.fsw._emitReady;
|
|
245132
|
+
if (this.fsw._isIgnored(path18) || this.fsw.closed) {
|
|
245133
|
+
ready();
|
|
245134
|
+
return false;
|
|
245135
|
+
}
|
|
245136
|
+
const wh2 = this.fsw._getWatchHelpers(path18);
|
|
245137
|
+
if (priorWh) {
|
|
245138
|
+
wh2.filterPath = (entry) => priorWh.filterPath(entry);
|
|
245139
|
+
wh2.filterDir = (entry) => priorWh.filterDir(entry);
|
|
245140
|
+
}
|
|
245141
|
+
try {
|
|
245142
|
+
const stats = await statMethods[wh2.statMethod](wh2.watchPath);
|
|
245143
|
+
if (this.fsw.closed)
|
|
245144
|
+
return;
|
|
245145
|
+
if (this.fsw._isIgnored(wh2.watchPath, stats)) {
|
|
245146
|
+
ready();
|
|
245147
|
+
return false;
|
|
245148
|
+
}
|
|
245149
|
+
const follow = this.fsw.options.followSymlinks;
|
|
245150
|
+
let closer;
|
|
245151
|
+
if (stats.isDirectory()) {
|
|
245152
|
+
const absPath = sp2.resolve(path18);
|
|
245153
|
+
const targetPath = follow ? await fsrealpath(path18) : path18;
|
|
245154
|
+
if (this.fsw.closed)
|
|
245155
|
+
return;
|
|
245156
|
+
closer = await this._handleDir(wh2.watchPath, stats, initialAdd, depth, target, wh2, targetPath);
|
|
245157
|
+
if (this.fsw.closed)
|
|
245158
|
+
return;
|
|
245159
|
+
if (absPath !== targetPath && targetPath !== undefined) {
|
|
245160
|
+
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
245161
|
+
}
|
|
245162
|
+
} else if (stats.isSymbolicLink()) {
|
|
245163
|
+
const targetPath = follow ? await fsrealpath(path18) : path18;
|
|
245164
|
+
if (this.fsw.closed)
|
|
245165
|
+
return;
|
|
245166
|
+
const parent = sp2.dirname(wh2.watchPath);
|
|
245167
|
+
this.fsw._getWatchedDir(parent).add(wh2.watchPath);
|
|
245168
|
+
this.fsw._emit(EV.ADD, wh2.watchPath, stats);
|
|
245169
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path18, wh2, targetPath);
|
|
245170
|
+
if (this.fsw.closed)
|
|
245171
|
+
return;
|
|
245172
|
+
if (targetPath !== undefined) {
|
|
245173
|
+
this.fsw._symlinkPaths.set(sp2.resolve(path18), targetPath);
|
|
245174
|
+
}
|
|
245175
|
+
} else {
|
|
245176
|
+
closer = this._handleFile(wh2.watchPath, stats, initialAdd);
|
|
245177
|
+
}
|
|
245178
|
+
ready();
|
|
245179
|
+
if (closer)
|
|
245180
|
+
this.fsw._addPathCloser(path18, closer);
|
|
245181
|
+
return false;
|
|
245182
|
+
} catch (error48) {
|
|
245183
|
+
if (this.fsw._handleError(error48)) {
|
|
245184
|
+
ready();
|
|
245185
|
+
return path18;
|
|
245186
|
+
}
|
|
245187
|
+
}
|
|
245188
|
+
}
|
|
245189
|
+
}
|
|
245190
|
+
|
|
245191
|
+
// node_modules/chokidar/index.js
|
|
245192
|
+
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
245193
|
+
var SLASH = "/";
|
|
245194
|
+
var SLASH_SLASH = "//";
|
|
245195
|
+
var ONE_DOT = ".";
|
|
245196
|
+
var TWO_DOTS = "..";
|
|
245197
|
+
var STRING_TYPE = "string";
|
|
245198
|
+
var BACK_SLASH_RE = /\\/g;
|
|
245199
|
+
var DOUBLE_SLASH_RE = /\/\//g;
|
|
245200
|
+
var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
245201
|
+
var REPLACER_RE = /^\.[/\\]/;
|
|
245202
|
+
function arrify(item) {
|
|
245203
|
+
return Array.isArray(item) ? item : [item];
|
|
245204
|
+
}
|
|
245205
|
+
var isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
|
|
245206
|
+
function createPattern(matcher) {
|
|
245207
|
+
if (typeof matcher === "function")
|
|
245208
|
+
return matcher;
|
|
245209
|
+
if (typeof matcher === "string")
|
|
245210
|
+
return (string4) => matcher === string4;
|
|
245211
|
+
if (matcher instanceof RegExp)
|
|
245212
|
+
return (string4) => matcher.test(string4);
|
|
245213
|
+
if (typeof matcher === "object" && matcher !== null) {
|
|
245214
|
+
return (string4) => {
|
|
245215
|
+
if (matcher.path === string4)
|
|
245216
|
+
return true;
|
|
245217
|
+
if (matcher.recursive) {
|
|
245218
|
+
const relative4 = sp3.relative(matcher.path, string4);
|
|
245219
|
+
if (!relative4) {
|
|
245220
|
+
return false;
|
|
245221
|
+
}
|
|
245222
|
+
return !relative4.startsWith("..") && !sp3.isAbsolute(relative4);
|
|
245223
|
+
}
|
|
245224
|
+
return false;
|
|
245225
|
+
};
|
|
245226
|
+
}
|
|
245227
|
+
return () => false;
|
|
245228
|
+
}
|
|
245229
|
+
function normalizePath(path18) {
|
|
245230
|
+
if (typeof path18 !== "string")
|
|
245231
|
+
throw new Error("string expected");
|
|
245232
|
+
path18 = sp3.normalize(path18);
|
|
245233
|
+
path18 = path18.replace(/\\/g, "/");
|
|
245234
|
+
let prepend = false;
|
|
245235
|
+
if (path18.startsWith("//"))
|
|
245236
|
+
prepend = true;
|
|
245237
|
+
path18 = path18.replace(DOUBLE_SLASH_RE, "/");
|
|
245238
|
+
if (prepend)
|
|
245239
|
+
path18 = "/" + path18;
|
|
245240
|
+
return path18;
|
|
245241
|
+
}
|
|
245242
|
+
function matchPatterns(patterns, testString, stats) {
|
|
245243
|
+
const path18 = normalizePath(testString);
|
|
245244
|
+
for (let index = 0;index < patterns.length; index++) {
|
|
245245
|
+
const pattern = patterns[index];
|
|
245246
|
+
if (pattern(path18, stats)) {
|
|
245247
|
+
return true;
|
|
245248
|
+
}
|
|
245249
|
+
}
|
|
245250
|
+
return false;
|
|
245251
|
+
}
|
|
245252
|
+
function anymatch(matchers, testString) {
|
|
245253
|
+
if (matchers == null) {
|
|
245254
|
+
throw new TypeError("anymatch: specify first argument");
|
|
245255
|
+
}
|
|
245256
|
+
const matchersArray = arrify(matchers);
|
|
245257
|
+
const patterns = matchersArray.map((matcher) => createPattern(matcher));
|
|
245258
|
+
if (testString == null) {
|
|
245259
|
+
return (testString2, stats) => {
|
|
245260
|
+
return matchPatterns(patterns, testString2, stats);
|
|
245261
|
+
};
|
|
245262
|
+
}
|
|
245263
|
+
return matchPatterns(patterns, testString);
|
|
245264
|
+
}
|
|
245265
|
+
var unifyPaths = (paths_) => {
|
|
245266
|
+
const paths = arrify(paths_).flat();
|
|
245267
|
+
if (!paths.every((p4) => typeof p4 === STRING_TYPE)) {
|
|
245268
|
+
throw new TypeError(`Non-string provided as watch path: ${paths}`);
|
|
245269
|
+
}
|
|
245270
|
+
return paths.map(normalizePathToUnix);
|
|
245271
|
+
};
|
|
245272
|
+
var toUnix = (string4) => {
|
|
245273
|
+
let str = string4.replace(BACK_SLASH_RE, SLASH);
|
|
245274
|
+
let prepend = false;
|
|
245275
|
+
if (str.startsWith(SLASH_SLASH)) {
|
|
245276
|
+
prepend = true;
|
|
245277
|
+
}
|
|
245278
|
+
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
245279
|
+
if (prepend) {
|
|
245280
|
+
str = SLASH + str;
|
|
245281
|
+
}
|
|
245282
|
+
return str;
|
|
245283
|
+
};
|
|
245284
|
+
var normalizePathToUnix = (path18) => toUnix(sp3.normalize(toUnix(path18)));
|
|
245285
|
+
var normalizeIgnored = (cwd = "") => (path18) => {
|
|
245286
|
+
if (typeof path18 === "string") {
|
|
245287
|
+
return normalizePathToUnix(sp3.isAbsolute(path18) ? path18 : sp3.join(cwd, path18));
|
|
245288
|
+
} else {
|
|
245289
|
+
return path18;
|
|
245290
|
+
}
|
|
245291
|
+
};
|
|
245292
|
+
var getAbsolutePath = (path18, cwd) => {
|
|
245293
|
+
if (sp3.isAbsolute(path18)) {
|
|
245294
|
+
return path18;
|
|
245295
|
+
}
|
|
245296
|
+
return sp3.join(cwd, path18);
|
|
245297
|
+
};
|
|
245298
|
+
var EMPTY_SET = Object.freeze(new Set);
|
|
245299
|
+
|
|
245300
|
+
class DirEntry {
|
|
245301
|
+
path;
|
|
245302
|
+
_removeWatcher;
|
|
245303
|
+
items;
|
|
245304
|
+
constructor(dir, removeWatcher) {
|
|
245305
|
+
this.path = dir;
|
|
245306
|
+
this._removeWatcher = removeWatcher;
|
|
245307
|
+
this.items = new Set;
|
|
245308
|
+
}
|
|
245309
|
+
add(item) {
|
|
245310
|
+
const { items } = this;
|
|
245311
|
+
if (!items)
|
|
245312
|
+
return;
|
|
245313
|
+
if (item !== ONE_DOT && item !== TWO_DOTS)
|
|
245314
|
+
items.add(item);
|
|
245315
|
+
}
|
|
245316
|
+
async remove(item) {
|
|
245317
|
+
const { items } = this;
|
|
245318
|
+
if (!items)
|
|
245319
|
+
return;
|
|
245320
|
+
items.delete(item);
|
|
245321
|
+
if (items.size > 0)
|
|
245322
|
+
return;
|
|
245323
|
+
const dir = this.path;
|
|
245324
|
+
try {
|
|
245325
|
+
await readdir3(dir);
|
|
245326
|
+
} catch (err) {
|
|
245327
|
+
if (this._removeWatcher) {
|
|
245328
|
+
this._removeWatcher(sp3.dirname(dir), sp3.basename(dir));
|
|
245329
|
+
}
|
|
245330
|
+
}
|
|
245331
|
+
}
|
|
245332
|
+
has(item) {
|
|
245333
|
+
const { items } = this;
|
|
245334
|
+
if (!items)
|
|
245335
|
+
return;
|
|
245336
|
+
return items.has(item);
|
|
245337
|
+
}
|
|
245338
|
+
getChildren() {
|
|
245339
|
+
const { items } = this;
|
|
245340
|
+
if (!items)
|
|
245341
|
+
return [];
|
|
245342
|
+
return [...items.values()];
|
|
245343
|
+
}
|
|
245344
|
+
dispose() {
|
|
245345
|
+
this.items.clear();
|
|
245346
|
+
this.path = "";
|
|
245347
|
+
this._removeWatcher = EMPTY_FN;
|
|
245348
|
+
this.items = EMPTY_SET;
|
|
245349
|
+
Object.freeze(this);
|
|
245350
|
+
}
|
|
245351
|
+
}
|
|
245352
|
+
var STAT_METHOD_F = "stat";
|
|
245353
|
+
var STAT_METHOD_L = "lstat";
|
|
245354
|
+
|
|
245355
|
+
class WatchHelper {
|
|
245356
|
+
fsw;
|
|
245357
|
+
path;
|
|
245358
|
+
watchPath;
|
|
245359
|
+
fullWatchPath;
|
|
245360
|
+
dirParts;
|
|
245361
|
+
followSymlinks;
|
|
245362
|
+
statMethod;
|
|
245363
|
+
constructor(path18, follow, fsw) {
|
|
245364
|
+
this.fsw = fsw;
|
|
245365
|
+
const watchPath = path18;
|
|
245366
|
+
this.path = path18 = path18.replace(REPLACER_RE, "");
|
|
245367
|
+
this.watchPath = watchPath;
|
|
245368
|
+
this.fullWatchPath = sp3.resolve(watchPath);
|
|
245369
|
+
this.dirParts = [];
|
|
245370
|
+
this.dirParts.forEach((parts) => {
|
|
245371
|
+
if (parts.length > 1)
|
|
245372
|
+
parts.pop();
|
|
245373
|
+
});
|
|
245374
|
+
this.followSymlinks = follow;
|
|
245375
|
+
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
245376
|
+
}
|
|
245377
|
+
entryPath(entry) {
|
|
245378
|
+
return sp3.join(this.watchPath, sp3.relative(this.watchPath, entry.fullPath));
|
|
245379
|
+
}
|
|
245380
|
+
filterPath(entry) {
|
|
245381
|
+
const { stats } = entry;
|
|
245382
|
+
if (stats && stats.isSymbolicLink())
|
|
245383
|
+
return this.filterDir(entry);
|
|
245384
|
+
const resolvedPath = this.entryPath(entry);
|
|
245385
|
+
return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
245386
|
+
}
|
|
245387
|
+
filterDir(entry) {
|
|
245388
|
+
return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
|
|
245389
|
+
}
|
|
245390
|
+
}
|
|
245391
|
+
|
|
245392
|
+
class FSWatcher extends EventEmitter3 {
|
|
245393
|
+
closed;
|
|
245394
|
+
options;
|
|
245395
|
+
_closers;
|
|
245396
|
+
_ignoredPaths;
|
|
245397
|
+
_throttled;
|
|
245398
|
+
_streams;
|
|
245399
|
+
_symlinkPaths;
|
|
245400
|
+
_watched;
|
|
245401
|
+
_pendingWrites;
|
|
245402
|
+
_pendingUnlinks;
|
|
245403
|
+
_readyCount;
|
|
245404
|
+
_emitReady;
|
|
245405
|
+
_closePromise;
|
|
245406
|
+
_userIgnored;
|
|
245407
|
+
_readyEmitted;
|
|
245408
|
+
_emitRaw;
|
|
245409
|
+
_boundRemove;
|
|
245410
|
+
_nodeFsHandler;
|
|
245411
|
+
constructor(_opts = {}) {
|
|
245412
|
+
super();
|
|
245413
|
+
this.closed = false;
|
|
245414
|
+
this._closers = new Map;
|
|
245415
|
+
this._ignoredPaths = new Set;
|
|
245416
|
+
this._throttled = new Map;
|
|
245417
|
+
this._streams = new Set;
|
|
245418
|
+
this._symlinkPaths = new Map;
|
|
245419
|
+
this._watched = new Map;
|
|
245420
|
+
this._pendingWrites = new Map;
|
|
245421
|
+
this._pendingUnlinks = new Map;
|
|
245422
|
+
this._readyCount = 0;
|
|
245423
|
+
this._readyEmitted = false;
|
|
245424
|
+
const awf = _opts.awaitWriteFinish;
|
|
245425
|
+
const DEF_AWF = { stabilityThreshold: 2000, pollInterval: 100 };
|
|
245426
|
+
const opts = {
|
|
245427
|
+
persistent: true,
|
|
245428
|
+
ignoreInitial: false,
|
|
245429
|
+
ignorePermissionErrors: false,
|
|
245430
|
+
interval: 100,
|
|
245431
|
+
binaryInterval: 300,
|
|
245432
|
+
followSymlinks: true,
|
|
245433
|
+
usePolling: false,
|
|
245434
|
+
atomic: true,
|
|
245435
|
+
..._opts,
|
|
245436
|
+
ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
|
|
245437
|
+
awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? { ...DEF_AWF, ...awf } : false
|
|
245438
|
+
};
|
|
245439
|
+
if (isIBMi)
|
|
245440
|
+
opts.usePolling = true;
|
|
245441
|
+
if (opts.atomic === undefined)
|
|
245442
|
+
opts.atomic = !opts.usePolling;
|
|
245443
|
+
const envPoll = process.env.CHOKIDAR_USEPOLLING;
|
|
245444
|
+
if (envPoll !== undefined) {
|
|
245445
|
+
const envLower = envPoll.toLowerCase();
|
|
245446
|
+
if (envLower === "false" || envLower === "0")
|
|
245447
|
+
opts.usePolling = false;
|
|
245448
|
+
else if (envLower === "true" || envLower === "1")
|
|
245449
|
+
opts.usePolling = true;
|
|
245450
|
+
else
|
|
245451
|
+
opts.usePolling = !!envLower;
|
|
245452
|
+
}
|
|
245453
|
+
const envInterval = process.env.CHOKIDAR_INTERVAL;
|
|
245454
|
+
if (envInterval)
|
|
245455
|
+
opts.interval = Number.parseInt(envInterval, 10);
|
|
245456
|
+
let readyCalls = 0;
|
|
245457
|
+
this._emitReady = () => {
|
|
245458
|
+
readyCalls++;
|
|
245459
|
+
if (readyCalls >= this._readyCount) {
|
|
245460
|
+
this._emitReady = EMPTY_FN;
|
|
245461
|
+
this._readyEmitted = true;
|
|
245462
|
+
process.nextTick(() => this.emit(EVENTS.READY));
|
|
245463
|
+
}
|
|
245464
|
+
};
|
|
245465
|
+
this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
|
|
245466
|
+
this._boundRemove = this._remove.bind(this);
|
|
245467
|
+
this.options = opts;
|
|
245468
|
+
this._nodeFsHandler = new NodeFsHandler(this);
|
|
245469
|
+
Object.freeze(opts);
|
|
245470
|
+
}
|
|
245471
|
+
_addIgnoredPath(matcher) {
|
|
245472
|
+
if (isMatcherObject(matcher)) {
|
|
245473
|
+
for (const ignored of this._ignoredPaths) {
|
|
245474
|
+
if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
|
|
245475
|
+
return;
|
|
245476
|
+
}
|
|
245477
|
+
}
|
|
245478
|
+
}
|
|
245479
|
+
this._ignoredPaths.add(matcher);
|
|
245480
|
+
}
|
|
245481
|
+
_removeIgnoredPath(matcher) {
|
|
245482
|
+
this._ignoredPaths.delete(matcher);
|
|
245483
|
+
if (typeof matcher === "string") {
|
|
245484
|
+
for (const ignored of this._ignoredPaths) {
|
|
245485
|
+
if (isMatcherObject(ignored) && ignored.path === matcher) {
|
|
245486
|
+
this._ignoredPaths.delete(ignored);
|
|
245487
|
+
}
|
|
245488
|
+
}
|
|
245489
|
+
}
|
|
245490
|
+
}
|
|
245491
|
+
add(paths_, _origAdd, _internal) {
|
|
245492
|
+
const { cwd } = this.options;
|
|
245493
|
+
this.closed = false;
|
|
245494
|
+
this._closePromise = undefined;
|
|
245495
|
+
let paths = unifyPaths(paths_);
|
|
245496
|
+
if (cwd) {
|
|
245497
|
+
paths = paths.map((path18) => {
|
|
245498
|
+
const absPath = getAbsolutePath(path18, cwd);
|
|
245499
|
+
return absPath;
|
|
245500
|
+
});
|
|
245501
|
+
}
|
|
245502
|
+
paths.forEach((path18) => {
|
|
245503
|
+
this._removeIgnoredPath(path18);
|
|
245504
|
+
});
|
|
245505
|
+
this._userIgnored = undefined;
|
|
245506
|
+
if (!this._readyCount)
|
|
245507
|
+
this._readyCount = 0;
|
|
245508
|
+
this._readyCount += paths.length;
|
|
245509
|
+
Promise.all(paths.map(async (path18) => {
|
|
245510
|
+
const res = await this._nodeFsHandler._addToNodeFs(path18, !_internal, undefined, 0, _origAdd);
|
|
245511
|
+
if (res)
|
|
245512
|
+
this._emitReady();
|
|
245513
|
+
return res;
|
|
245514
|
+
})).then((results) => {
|
|
245515
|
+
if (this.closed)
|
|
245516
|
+
return;
|
|
245517
|
+
results.forEach((item) => {
|
|
245518
|
+
if (item)
|
|
245519
|
+
this.add(sp3.dirname(item), sp3.basename(_origAdd || item));
|
|
245520
|
+
});
|
|
245521
|
+
});
|
|
245522
|
+
return this;
|
|
245523
|
+
}
|
|
245524
|
+
unwatch(paths_) {
|
|
245525
|
+
if (this.closed)
|
|
245526
|
+
return this;
|
|
245527
|
+
const paths = unifyPaths(paths_);
|
|
245528
|
+
const { cwd } = this.options;
|
|
245529
|
+
paths.forEach((path18) => {
|
|
245530
|
+
if (!sp3.isAbsolute(path18) && !this._closers.has(path18)) {
|
|
245531
|
+
if (cwd)
|
|
245532
|
+
path18 = sp3.join(cwd, path18);
|
|
245533
|
+
path18 = sp3.resolve(path18);
|
|
245534
|
+
}
|
|
245535
|
+
this._closePath(path18);
|
|
245536
|
+
this._addIgnoredPath(path18);
|
|
245537
|
+
if (this._watched.has(path18)) {
|
|
245538
|
+
this._addIgnoredPath({
|
|
245539
|
+
path: path18,
|
|
245540
|
+
recursive: true
|
|
245541
|
+
});
|
|
245542
|
+
}
|
|
245543
|
+
this._userIgnored = undefined;
|
|
245544
|
+
});
|
|
245545
|
+
return this;
|
|
245546
|
+
}
|
|
245547
|
+
close() {
|
|
245548
|
+
if (this._closePromise) {
|
|
245549
|
+
return this._closePromise;
|
|
245550
|
+
}
|
|
245551
|
+
this.closed = true;
|
|
245552
|
+
this.removeAllListeners();
|
|
245553
|
+
const closers = [];
|
|
245554
|
+
this._closers.forEach((closerList) => closerList.forEach((closer) => {
|
|
245555
|
+
const promise2 = closer();
|
|
245556
|
+
if (promise2 instanceof Promise)
|
|
245557
|
+
closers.push(promise2);
|
|
245558
|
+
}));
|
|
245559
|
+
this._streams.forEach((stream) => stream.destroy());
|
|
245560
|
+
this._userIgnored = undefined;
|
|
245561
|
+
this._readyCount = 0;
|
|
245562
|
+
this._readyEmitted = false;
|
|
245563
|
+
this._watched.forEach((dirent) => dirent.dispose());
|
|
245564
|
+
this._closers.clear();
|
|
245565
|
+
this._watched.clear();
|
|
245566
|
+
this._streams.clear();
|
|
245567
|
+
this._symlinkPaths.clear();
|
|
245568
|
+
this._throttled.clear();
|
|
245569
|
+
this._closePromise = closers.length ? Promise.all(closers).then(() => {
|
|
245570
|
+
return;
|
|
245571
|
+
}) : Promise.resolve();
|
|
245572
|
+
return this._closePromise;
|
|
245573
|
+
}
|
|
245574
|
+
getWatched() {
|
|
245575
|
+
const watchList = {};
|
|
245576
|
+
this._watched.forEach((entry, dir) => {
|
|
245577
|
+
const key2 = this.options.cwd ? sp3.relative(this.options.cwd, dir) : dir;
|
|
245578
|
+
const index = key2 || ONE_DOT;
|
|
245579
|
+
watchList[index] = entry.getChildren().sort();
|
|
245580
|
+
});
|
|
245581
|
+
return watchList;
|
|
245582
|
+
}
|
|
245583
|
+
emitWithAll(event, args) {
|
|
245584
|
+
this.emit(event, ...args);
|
|
245585
|
+
if (event !== EVENTS.ERROR)
|
|
245586
|
+
this.emit(EVENTS.ALL, event, ...args);
|
|
245587
|
+
}
|
|
245588
|
+
async _emit(event, path18, stats) {
|
|
245589
|
+
if (this.closed)
|
|
245590
|
+
return;
|
|
245591
|
+
const opts = this.options;
|
|
245592
|
+
if (isWindows4)
|
|
245593
|
+
path18 = sp3.normalize(path18);
|
|
245594
|
+
if (opts.cwd)
|
|
245595
|
+
path18 = sp3.relative(opts.cwd, path18);
|
|
245596
|
+
const args = [path18];
|
|
245597
|
+
if (stats != null)
|
|
245598
|
+
args.push(stats);
|
|
245599
|
+
const awf = opts.awaitWriteFinish;
|
|
245600
|
+
let pw;
|
|
245601
|
+
if (awf && (pw = this._pendingWrites.get(path18))) {
|
|
245602
|
+
pw.lastChange = new Date;
|
|
245603
|
+
return this;
|
|
245604
|
+
}
|
|
245605
|
+
if (opts.atomic) {
|
|
245606
|
+
if (event === EVENTS.UNLINK) {
|
|
245607
|
+
this._pendingUnlinks.set(path18, [event, ...args]);
|
|
245608
|
+
setTimeout(() => {
|
|
245609
|
+
this._pendingUnlinks.forEach((entry, path19) => {
|
|
245610
|
+
this.emit(...entry);
|
|
245611
|
+
this.emit(EVENTS.ALL, ...entry);
|
|
245612
|
+
this._pendingUnlinks.delete(path19);
|
|
245613
|
+
});
|
|
245614
|
+
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
245615
|
+
return this;
|
|
245616
|
+
}
|
|
245617
|
+
if (event === EVENTS.ADD && this._pendingUnlinks.has(path18)) {
|
|
245618
|
+
event = EVENTS.CHANGE;
|
|
245619
|
+
this._pendingUnlinks.delete(path18);
|
|
245620
|
+
}
|
|
245621
|
+
}
|
|
245622
|
+
if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
|
|
245623
|
+
const awfEmit = (err, stats2) => {
|
|
245624
|
+
if (err) {
|
|
245625
|
+
event = EVENTS.ERROR;
|
|
245626
|
+
args[0] = err;
|
|
245627
|
+
this.emitWithAll(event, args);
|
|
245628
|
+
} else if (stats2) {
|
|
245629
|
+
if (args.length > 1) {
|
|
245630
|
+
args[1] = stats2;
|
|
245631
|
+
} else {
|
|
245632
|
+
args.push(stats2);
|
|
245633
|
+
}
|
|
245634
|
+
this.emitWithAll(event, args);
|
|
245635
|
+
}
|
|
245636
|
+
};
|
|
245637
|
+
this._awaitWriteFinish(path18, awf.stabilityThreshold, event, awfEmit);
|
|
245638
|
+
return this;
|
|
245639
|
+
}
|
|
245640
|
+
if (event === EVENTS.CHANGE) {
|
|
245641
|
+
const isThrottled = !this._throttle(EVENTS.CHANGE, path18, 50);
|
|
245642
|
+
if (isThrottled)
|
|
245643
|
+
return this;
|
|
245644
|
+
}
|
|
245645
|
+
if (opts.alwaysStat && stats === undefined && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
245646
|
+
const fullPath = opts.cwd ? sp3.join(opts.cwd, path18) : path18;
|
|
245647
|
+
let stats2;
|
|
245648
|
+
try {
|
|
245649
|
+
stats2 = await stat4(fullPath);
|
|
245650
|
+
} catch (err) {}
|
|
245651
|
+
if (!stats2 || this.closed)
|
|
245652
|
+
return;
|
|
245653
|
+
args.push(stats2);
|
|
245654
|
+
}
|
|
245655
|
+
this.emitWithAll(event, args);
|
|
245656
|
+
return this;
|
|
245657
|
+
}
|
|
245658
|
+
_handleError(error48) {
|
|
245659
|
+
const code2 = error48 && error48.code;
|
|
245660
|
+
if (error48 && code2 !== "ENOENT" && code2 !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code2 !== "EPERM" && code2 !== "EACCES")) {
|
|
245661
|
+
this.emit(EVENTS.ERROR, error48);
|
|
245662
|
+
}
|
|
245663
|
+
return error48 || this.closed;
|
|
245664
|
+
}
|
|
245665
|
+
_throttle(actionType, path18, timeout3) {
|
|
245666
|
+
if (!this._throttled.has(actionType)) {
|
|
245667
|
+
this._throttled.set(actionType, new Map);
|
|
245668
|
+
}
|
|
245669
|
+
const action = this._throttled.get(actionType);
|
|
245670
|
+
if (!action)
|
|
245671
|
+
throw new Error("invalid throttle");
|
|
245672
|
+
const actionPath = action.get(path18);
|
|
245673
|
+
if (actionPath) {
|
|
245674
|
+
actionPath.count++;
|
|
245675
|
+
return false;
|
|
245676
|
+
}
|
|
245677
|
+
let timeoutObject;
|
|
245678
|
+
const clear = () => {
|
|
245679
|
+
const item = action.get(path18);
|
|
245680
|
+
const count2 = item ? item.count : 0;
|
|
245681
|
+
action.delete(path18);
|
|
245682
|
+
clearTimeout(timeoutObject);
|
|
245683
|
+
if (item)
|
|
245684
|
+
clearTimeout(item.timeoutObject);
|
|
245685
|
+
return count2;
|
|
245686
|
+
};
|
|
245687
|
+
timeoutObject = setTimeout(clear, timeout3);
|
|
245688
|
+
const thr = { timeoutObject, clear, count: 0 };
|
|
245689
|
+
action.set(path18, thr);
|
|
245690
|
+
return thr;
|
|
245691
|
+
}
|
|
245692
|
+
_incrReadyCount() {
|
|
245693
|
+
return this._readyCount++;
|
|
245694
|
+
}
|
|
245695
|
+
_awaitWriteFinish(path18, threshold, event, awfEmit) {
|
|
245696
|
+
const awf = this.options.awaitWriteFinish;
|
|
245697
|
+
if (typeof awf !== "object")
|
|
245698
|
+
return;
|
|
245699
|
+
const pollInterval = awf.pollInterval;
|
|
245700
|
+
let timeoutHandler;
|
|
245701
|
+
let fullPath = path18;
|
|
245702
|
+
if (this.options.cwd && !sp3.isAbsolute(path18)) {
|
|
245703
|
+
fullPath = sp3.join(this.options.cwd, path18);
|
|
245704
|
+
}
|
|
245705
|
+
const now = new Date;
|
|
245706
|
+
const writes = this._pendingWrites;
|
|
245707
|
+
function awaitWriteFinishFn(prevStat) {
|
|
245708
|
+
statcb(fullPath, (err, curStat) => {
|
|
245709
|
+
if (err || !writes.has(path18)) {
|
|
245710
|
+
if (err && err.code !== "ENOENT")
|
|
245711
|
+
awfEmit(err);
|
|
245712
|
+
return;
|
|
245713
|
+
}
|
|
245714
|
+
const now2 = Number(new Date);
|
|
245715
|
+
if (prevStat && curStat.size !== prevStat.size) {
|
|
245716
|
+
writes.get(path18).lastChange = now2;
|
|
245717
|
+
}
|
|
245718
|
+
const pw = writes.get(path18);
|
|
245719
|
+
const df3 = now2 - pw.lastChange;
|
|
245720
|
+
if (df3 >= threshold) {
|
|
245721
|
+
writes.delete(path18);
|
|
245722
|
+
awfEmit(undefined, curStat);
|
|
245723
|
+
} else {
|
|
245724
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
|
|
245725
|
+
}
|
|
245726
|
+
});
|
|
245727
|
+
}
|
|
245728
|
+
if (!writes.has(path18)) {
|
|
245729
|
+
writes.set(path18, {
|
|
245730
|
+
lastChange: now,
|
|
245731
|
+
cancelWait: () => {
|
|
245732
|
+
writes.delete(path18);
|
|
245733
|
+
clearTimeout(timeoutHandler);
|
|
245734
|
+
return event;
|
|
245735
|
+
}
|
|
245736
|
+
});
|
|
245737
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
|
|
245738
|
+
}
|
|
245739
|
+
}
|
|
245740
|
+
_isIgnored(path18, stats) {
|
|
245741
|
+
if (this.options.atomic && DOT_RE.test(path18))
|
|
245742
|
+
return true;
|
|
245743
|
+
if (!this._userIgnored) {
|
|
245744
|
+
const { cwd } = this.options;
|
|
245745
|
+
const ign = this.options.ignored;
|
|
245746
|
+
const ignored = (ign || []).map(normalizeIgnored(cwd));
|
|
245747
|
+
const ignoredPaths = [...this._ignoredPaths];
|
|
245748
|
+
const list3 = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
|
|
245749
|
+
this._userIgnored = anymatch(list3, undefined);
|
|
245750
|
+
}
|
|
245751
|
+
return this._userIgnored(path18, stats);
|
|
245752
|
+
}
|
|
245753
|
+
_isntIgnored(path18, stat5) {
|
|
245754
|
+
return !this._isIgnored(path18, stat5);
|
|
245755
|
+
}
|
|
245756
|
+
_getWatchHelpers(path18) {
|
|
245757
|
+
return new WatchHelper(path18, this.options.followSymlinks, this);
|
|
245758
|
+
}
|
|
245759
|
+
_getWatchedDir(directory) {
|
|
245760
|
+
const dir = sp3.resolve(directory);
|
|
245761
|
+
if (!this._watched.has(dir))
|
|
245762
|
+
this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
245763
|
+
return this._watched.get(dir);
|
|
245764
|
+
}
|
|
245765
|
+
_hasReadPermissions(stats) {
|
|
245766
|
+
if (this.options.ignorePermissionErrors)
|
|
245767
|
+
return true;
|
|
245768
|
+
return Boolean(Number(stats.mode) & 256);
|
|
245769
|
+
}
|
|
245770
|
+
_remove(directory, item, isDirectory3) {
|
|
245771
|
+
const path18 = sp3.join(directory, item);
|
|
245772
|
+
const fullPath = sp3.resolve(path18);
|
|
245773
|
+
isDirectory3 = isDirectory3 != null ? isDirectory3 : this._watched.has(path18) || this._watched.has(fullPath);
|
|
245774
|
+
if (!this._throttle("remove", path18, 100))
|
|
245775
|
+
return;
|
|
245776
|
+
if (!isDirectory3 && this._watched.size === 1) {
|
|
245777
|
+
this.add(directory, item, true);
|
|
245778
|
+
}
|
|
245779
|
+
const wp5 = this._getWatchedDir(path18);
|
|
245780
|
+
const nestedDirectoryChildren = wp5.getChildren();
|
|
245781
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path18, nested));
|
|
245782
|
+
const parent = this._getWatchedDir(directory);
|
|
245783
|
+
const wasTracked = parent.has(item);
|
|
245784
|
+
parent.remove(item);
|
|
245785
|
+
if (this._symlinkPaths.has(fullPath)) {
|
|
245786
|
+
this._symlinkPaths.delete(fullPath);
|
|
245787
|
+
}
|
|
245788
|
+
let relPath = path18;
|
|
245789
|
+
if (this.options.cwd)
|
|
245790
|
+
relPath = sp3.relative(this.options.cwd, path18);
|
|
245791
|
+
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
245792
|
+
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
245793
|
+
if (event === EVENTS.ADD)
|
|
245794
|
+
return;
|
|
245795
|
+
}
|
|
245796
|
+
this._watched.delete(path18);
|
|
245797
|
+
this._watched.delete(fullPath);
|
|
245798
|
+
const eventName = isDirectory3 ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
|
|
245799
|
+
if (wasTracked && !this._isIgnored(path18))
|
|
245800
|
+
this._emit(eventName, path18);
|
|
245801
|
+
this._closePath(path18);
|
|
245802
|
+
}
|
|
245803
|
+
_closePath(path18) {
|
|
245804
|
+
this._closeFile(path18);
|
|
245805
|
+
const dir = sp3.dirname(path18);
|
|
245806
|
+
this._getWatchedDir(dir).remove(sp3.basename(path18));
|
|
245807
|
+
}
|
|
245808
|
+
_closeFile(path18) {
|
|
245809
|
+
const closers = this._closers.get(path18);
|
|
245810
|
+
if (!closers)
|
|
245811
|
+
return;
|
|
245812
|
+
closers.forEach((closer) => closer());
|
|
245813
|
+
this._closers.delete(path18);
|
|
245814
|
+
}
|
|
245815
|
+
_addPathCloser(path18, closer) {
|
|
245816
|
+
if (!closer)
|
|
245817
|
+
return;
|
|
245818
|
+
let list3 = this._closers.get(path18);
|
|
245819
|
+
if (!list3) {
|
|
245820
|
+
list3 = [];
|
|
245821
|
+
this._closers.set(path18, list3);
|
|
245822
|
+
}
|
|
245823
|
+
list3.push(closer);
|
|
245824
|
+
}
|
|
245825
|
+
_readdirp(root2, opts) {
|
|
245826
|
+
if (this.closed)
|
|
245827
|
+
return;
|
|
245828
|
+
const options8 = { type: EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 };
|
|
245829
|
+
let stream = readdirp(root2, options8);
|
|
245830
|
+
this._streams.add(stream);
|
|
245831
|
+
stream.once(STR_CLOSE, () => {
|
|
245832
|
+
stream = undefined;
|
|
245833
|
+
});
|
|
245834
|
+
stream.once(STR_END, () => {
|
|
245835
|
+
if (stream) {
|
|
245836
|
+
this._streams.delete(stream);
|
|
245837
|
+
stream = undefined;
|
|
245838
|
+
}
|
|
245839
|
+
});
|
|
245840
|
+
return stream;
|
|
245841
|
+
}
|
|
245842
|
+
}
|
|
245843
|
+
function watch(paths, options8 = {}) {
|
|
245844
|
+
const watcher = new FSWatcher(options8);
|
|
245845
|
+
watcher.add(paths);
|
|
245846
|
+
return watcher;
|
|
245847
|
+
}
|
|
245848
|
+
|
|
245849
|
+
// src/cli/dev/dev-server/dir-watcher.ts
|
|
245850
|
+
var import_debounce = __toESM(require_debounce(), 1);
|
|
245851
|
+
var WATCH_DEBOUNCE_MS = 300;
|
|
245852
|
+
|
|
245853
|
+
class DirWatcher {
|
|
245854
|
+
targetDir;
|
|
245855
|
+
onChange;
|
|
245856
|
+
logger;
|
|
245857
|
+
watcher = null;
|
|
245858
|
+
closed = false;
|
|
245859
|
+
constructor(targetDir, onChange, logger) {
|
|
245860
|
+
this.targetDir = targetDir;
|
|
245861
|
+
this.onChange = onChange;
|
|
245862
|
+
this.logger = logger;
|
|
245863
|
+
}
|
|
245864
|
+
async start() {
|
|
245865
|
+
if (await pathExists(this.targetDir)) {
|
|
245866
|
+
this.watchTarget();
|
|
245867
|
+
} else {
|
|
245868
|
+
this.watchParentForCreation();
|
|
245869
|
+
}
|
|
245870
|
+
}
|
|
245871
|
+
close() {
|
|
245872
|
+
this.closed = true;
|
|
245873
|
+
this.watcher?.close();
|
|
245874
|
+
this.watcher = null;
|
|
245875
|
+
}
|
|
245876
|
+
watchTarget() {
|
|
245877
|
+
if (this.closed) {
|
|
245878
|
+
return;
|
|
245879
|
+
}
|
|
245880
|
+
const handler = import_debounce.default(async () => {
|
|
245881
|
+
try {
|
|
245882
|
+
await this.onChange();
|
|
245883
|
+
} catch (error48) {
|
|
245884
|
+
this.handleError(error48);
|
|
245885
|
+
}
|
|
245886
|
+
}, WATCH_DEBOUNCE_MS);
|
|
245887
|
+
this.watcher = watch(this.targetDir, { ignoreInitial: true });
|
|
245888
|
+
this.watcher.on("all", handler);
|
|
245889
|
+
}
|
|
245890
|
+
watchParentForCreation() {
|
|
245891
|
+
if (this.closed) {
|
|
245892
|
+
return;
|
|
245893
|
+
}
|
|
245894
|
+
const parentDir = dirname14(this.targetDir);
|
|
245895
|
+
const handler = import_debounce.default(async () => {
|
|
245896
|
+
if (this.closed) {
|
|
245897
|
+
return;
|
|
245898
|
+
}
|
|
245899
|
+
if (await pathExists(this.targetDir)) {
|
|
245900
|
+
handler.cancel();
|
|
245901
|
+
await this.watcher?.close();
|
|
245902
|
+
this.watcher = null;
|
|
245903
|
+
this.watchTarget();
|
|
245904
|
+
try {
|
|
245905
|
+
await this.onChange();
|
|
245906
|
+
} catch (error48) {
|
|
245907
|
+
this.handleError(error48);
|
|
245908
|
+
}
|
|
245909
|
+
}
|
|
245910
|
+
}, WATCH_DEBOUNCE_MS);
|
|
245911
|
+
this.watcher = watch(parentDir, { ignoreInitial: true, depth: 0 });
|
|
245912
|
+
this.watcher.on("all", handler);
|
|
245913
|
+
}
|
|
245914
|
+
handleError(error48) {
|
|
245915
|
+
this.logger.error(`[dev-server] Watch handler failed for ${this.targetDir}`, error48 instanceof Error ? error48 : undefined);
|
|
245916
|
+
}
|
|
245917
|
+
}
|
|
245918
|
+
|
|
243883
245919
|
// node_modules/socket.io/wrapper.mjs
|
|
243884
245920
|
var import_dist = __toESM(require_dist4(), 1);
|
|
243885
245921
|
var { Server, Namespace, Socket } = import_dist.default;
|
|
@@ -244238,7 +246274,7 @@ async function createDevServer(options8) {
|
|
|
244238
246274
|
const { port: userPort } = options8;
|
|
244239
246275
|
const port = userPort ?? await getPorts({ port: DEFAULT_PORT });
|
|
244240
246276
|
const baseUrl = `http://localhost:${port}`;
|
|
244241
|
-
const { functions, entities } = await options8.loadResources();
|
|
246277
|
+
const { functions, entities, project: project2 } = await options8.loadResources();
|
|
244242
246278
|
const app = import_express4.default();
|
|
244243
246279
|
const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
|
|
244244
246280
|
target: BASE44_APP_URL,
|
|
@@ -244258,10 +246294,10 @@ async function createDevServer(options8) {
|
|
|
244258
246294
|
});
|
|
244259
246295
|
const devLogger = createDevLogger();
|
|
244260
246296
|
const functionManager = new FunctionManager(functions, devLogger);
|
|
246297
|
+
const functionRoutes = createFunctionRouter(functionManager, devLogger);
|
|
246298
|
+
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
244261
246299
|
if (functionManager.getFunctionNames().length > 0) {
|
|
244262
246300
|
R2.info(`Loaded functions: ${functionManager.getFunctionNames().join(", ")}`);
|
|
244263
|
-
const functionRoutes = createFunctionRouter(functionManager, devLogger);
|
|
244264
|
-
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
244265
246301
|
}
|
|
244266
246302
|
const db2 = new Database(entities);
|
|
244267
246303
|
if (db2.getCollectionNames().length > 0) {
|
|
@@ -244280,8 +246316,8 @@ async function createDevServer(options8) {
|
|
|
244280
246316
|
devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
|
|
244281
246317
|
remoteProxy(req, res, next);
|
|
244282
246318
|
});
|
|
244283
|
-
|
|
244284
|
-
const
|
|
246319
|
+
const server = await new Promise((resolve8, reject) => {
|
|
246320
|
+
const s5 = app.listen(port, "127.0.0.1", (err) => {
|
|
244285
246321
|
if (err) {
|
|
244286
246322
|
if ("code" in err && err.code === "EADDRINUSE") {
|
|
244287
246323
|
reject(new Error(`Port ${port} is already in use. Stop the other process and try again.`));
|
|
@@ -244289,24 +246325,37 @@ async function createDevServer(options8) {
|
|
|
244289
246325
|
reject(err);
|
|
244290
246326
|
}
|
|
244291
246327
|
} else {
|
|
244292
|
-
|
|
244293
|
-
emitEntityEvent = (appId, entityName, event) => {
|
|
244294
|
-
broadcastEntityEvent(io6, appId, entityName, event);
|
|
244295
|
-
};
|
|
244296
|
-
const shutdown = () => {
|
|
244297
|
-
io6.close();
|
|
244298
|
-
functionManager.stopAll();
|
|
244299
|
-
server.close();
|
|
244300
|
-
};
|
|
244301
|
-
process.on("SIGINT", shutdown);
|
|
244302
|
-
process.on("SIGTERM", shutdown);
|
|
244303
|
-
resolve6({
|
|
244304
|
-
port,
|
|
244305
|
-
server
|
|
244306
|
-
});
|
|
246328
|
+
resolve8(s5);
|
|
244307
246329
|
}
|
|
244308
246330
|
});
|
|
244309
246331
|
});
|
|
246332
|
+
const io6 = createRealtimeServer(server);
|
|
246333
|
+
emitEntityEvent = (appId, entityName, event) => {
|
|
246334
|
+
broadcastEntityEvent(io6, appId, entityName, event);
|
|
246335
|
+
};
|
|
246336
|
+
const configDir = dirname15(project2.configPath);
|
|
246337
|
+
const functionsDir = join18(configDir, project2.functionsDir);
|
|
246338
|
+
const functionsWatcher = new DirWatcher(functionsDir, async () => {
|
|
246339
|
+
const { functions: functions2 } = await options8.loadResources();
|
|
246340
|
+
const previousNamesLength = functionManager.getFunctionNames().length;
|
|
246341
|
+
functionManager.reload(functions2);
|
|
246342
|
+
const names = functionManager.getFunctionNames();
|
|
246343
|
+
if (names.length > 0) {
|
|
246344
|
+
devLogger.log(`Reloaded functions: ${names.sort().join(", ")}`);
|
|
246345
|
+
} else if (previousNamesLength > 0) {
|
|
246346
|
+
devLogger.log("All functions removed");
|
|
246347
|
+
}
|
|
246348
|
+
}, devLogger);
|
|
246349
|
+
await functionsWatcher.start();
|
|
246350
|
+
const shutdown = () => {
|
|
246351
|
+
functionsWatcher.close();
|
|
246352
|
+
io6.close();
|
|
246353
|
+
functionManager.stopAll();
|
|
246354
|
+
server.close();
|
|
246355
|
+
};
|
|
246356
|
+
process.on("SIGINT", shutdown);
|
|
246357
|
+
process.on("SIGTERM", shutdown);
|
|
246358
|
+
return { port, server };
|
|
244310
246359
|
}
|
|
244311
246360
|
|
|
244312
246361
|
// src/cli/commands/dev.ts
|
|
@@ -244330,8 +246379,8 @@ function getDevCommand(context) {
|
|
|
244330
246379
|
}
|
|
244331
246380
|
|
|
244332
246381
|
// src/cli/commands/project/eject.ts
|
|
244333
|
-
import { resolve as
|
|
244334
|
-
var
|
|
246382
|
+
import { resolve as resolve8 } from "node:path";
|
|
246383
|
+
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
244335
246384
|
async function eject(options8) {
|
|
244336
246385
|
const projects = await listProjects();
|
|
244337
246386
|
const ejectableProjects = projects.filter((p4) => p4.isManagedSourceCode !== false);
|
|
@@ -244369,7 +246418,7 @@ async function eject(options8) {
|
|
|
244369
246418
|
selectedProject = selected;
|
|
244370
246419
|
}
|
|
244371
246420
|
const projectId = selectedProject.id;
|
|
244372
|
-
const suggestedPath = await isDirEmpty() ? `./` : `./${
|
|
246421
|
+
const suggestedPath = await isDirEmpty() ? `./` : `./${import_kebabCase2.default(selectedProject.name)}`;
|
|
244373
246422
|
const selectedPath = options8.path ?? await Ze({
|
|
244374
246423
|
message: "Where should we create your project?",
|
|
244375
246424
|
placeholder: suggestedPath,
|
|
@@ -244379,7 +246428,7 @@ async function eject(options8) {
|
|
|
244379
246428
|
Ne("Operation cancelled.");
|
|
244380
246429
|
throw new CLIExitError(0);
|
|
244381
246430
|
}
|
|
244382
|
-
const resolvedPath =
|
|
246431
|
+
const resolvedPath = resolve8(selectedPath);
|
|
244383
246432
|
await runTask("Downloading your project's code...", async (updateMessage) => {
|
|
244384
246433
|
await createProjectFilesForExistingProject({
|
|
244385
246434
|
projectId,
|
|
@@ -244455,7 +246504,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
244455
246504
|
import { release, type } from "node:os";
|
|
244456
246505
|
|
|
244457
246506
|
// node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
244458
|
-
import { dirname as
|
|
246507
|
+
import { dirname as dirname16, posix, sep } from "path";
|
|
244459
246508
|
function createModulerModifier() {
|
|
244460
246509
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
244461
246510
|
return async (frames) => {
|
|
@@ -244464,12 +246513,12 @@ function createModulerModifier() {
|
|
|
244464
246513
|
return frames;
|
|
244465
246514
|
};
|
|
244466
246515
|
}
|
|
244467
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
244468
|
-
const normalizedBase =
|
|
246516
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
246517
|
+
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
244469
246518
|
return (filename) => {
|
|
244470
246519
|
if (!filename)
|
|
244471
246520
|
return;
|
|
244472
|
-
const normalizedFilename =
|
|
246521
|
+
const normalizedFilename = isWindows5 ? normalizeWindowsPath2(filename) : filename;
|
|
244473
246522
|
let { dir, base: file2, ext } = posix.parse(normalizedFilename);
|
|
244474
246523
|
if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
|
|
244475
246524
|
file2 = file2.slice(0, -1 * ext.length);
|
|
@@ -246742,14 +248791,14 @@ async function addSourceContext(frames) {
|
|
|
246742
248791
|
return frames;
|
|
246743
248792
|
}
|
|
246744
248793
|
function getContextLinesFromFile(path19, ranges, output) {
|
|
246745
|
-
return new Promise((
|
|
248794
|
+
return new Promise((resolve9) => {
|
|
246746
248795
|
const stream = createReadStream2(path19);
|
|
246747
248796
|
const lineReaded = createInterface2({
|
|
246748
248797
|
input: stream
|
|
246749
248798
|
});
|
|
246750
248799
|
function destroyStreamAndResolve() {
|
|
246751
248800
|
stream.destroy();
|
|
246752
|
-
|
|
248801
|
+
resolve9();
|
|
246753
248802
|
}
|
|
246754
248803
|
let lineNumber = 0;
|
|
246755
248804
|
let currentRangeIndex = 0;
|
|
@@ -247861,15 +249910,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
|
|
|
247861
249910
|
return true;
|
|
247862
249911
|
if (this.featureFlagsPoller === undefined)
|
|
247863
249912
|
return false;
|
|
247864
|
-
return new Promise((
|
|
249913
|
+
return new Promise((resolve9) => {
|
|
247865
249914
|
const timeout3 = setTimeout(() => {
|
|
247866
249915
|
cleanup();
|
|
247867
|
-
|
|
249916
|
+
resolve9(false);
|
|
247868
249917
|
}, timeoutMs);
|
|
247869
249918
|
const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
|
|
247870
249919
|
clearTimeout(timeout3);
|
|
247871
249920
|
cleanup();
|
|
247872
|
-
|
|
249921
|
+
resolve9(count2 > 0);
|
|
247873
249922
|
});
|
|
247874
249923
|
});
|
|
247875
249924
|
}
|
|
@@ -248682,4 +250731,4 @@ export {
|
|
|
248682
250731
|
CLIExitError
|
|
248683
250732
|
};
|
|
248684
250733
|
|
|
248685
|
-
//# debugId=
|
|
250734
|
+
//# debugId=34515ECB16FFFDAF64756E2164756E21
|