@sanity/cli 4.13.1-next.2 → 4.14.0-next.11
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/lib/_chunks-cjs/cli.js +146 -101
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/package.json +7 -7
package/lib/_chunks-cjs/cli.js
CHANGED
|
@@ -38725,7 +38725,7 @@ function requireLib$1() {
|
|
|
38725
38725
|
allowUndeclaredExports: !1,
|
|
38726
38726
|
allowYieldOutsideFunction: !1,
|
|
38727
38727
|
plugins: [],
|
|
38728
|
-
strictMode:
|
|
38728
|
+
strictMode: void 0,
|
|
38729
38729
|
ranges: !1,
|
|
38730
38730
|
tokens: !1,
|
|
38731
38731
|
createImportExpressions: !1,
|
|
@@ -38864,7 +38864,7 @@ function requireLib$1() {
|
|
|
38864
38864
|
}
|
|
38865
38865
|
convertPrivateNameToPrivateIdentifier(node) {
|
|
38866
38866
|
const name = super.getPrivateNameSV(node);
|
|
38867
|
-
return
|
|
38867
|
+
return delete node.id, node.name = name, this.castNodeTo(node, "PrivateIdentifier");
|
|
38868
38868
|
}
|
|
38869
38869
|
isPrivateName(node) {
|
|
38870
38870
|
return this.getPluginOption("estree", "classFeatures") ? node.type === "PrivateIdentifier" : super.isPrivateName(node);
|
|
@@ -38911,8 +38911,8 @@ function requireLib$1() {
|
|
|
38911
38911
|
finishObjectProperty(node) {
|
|
38912
38912
|
return node.kind = "init", this.finishNode(node, "Property");
|
|
38913
38913
|
}
|
|
38914
|
-
isValidLVal(type2, isUnparenthesizedInAssign, binding) {
|
|
38915
|
-
return type2 === "Property" ? "value" : super.isValidLVal(type2, isUnparenthesizedInAssign, binding);
|
|
38914
|
+
isValidLVal(type2, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
38915
|
+
return type2 === "Property" ? "value" : super.isValidLVal(type2, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
38916
38916
|
}
|
|
38917
38917
|
isAssignable(node, isBinding) {
|
|
38918
38918
|
return node != null && this.isObjectProperty(node) ? this.isAssignable(node.value, isBinding) : super.isAssignable(node, isBinding);
|
|
@@ -39515,10 +39515,10 @@ function requireLib$1() {
|
|
|
39515
39515
|
}, tokenTypes[143].updateContext = (context) => {
|
|
39516
39516
|
context.push(types2.j_expr, types2.j_oTag);
|
|
39517
39517
|
};
|
|
39518
|
-
let nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\
|
|
39518
|
+
let nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC", nonASCIIidentifierChars = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
39519
39519
|
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"), nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
39520
39520
|
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
39521
|
-
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25,
|
|
39521
|
+
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489], astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
39522
39522
|
function isInAstralSet(code2, set2) {
|
|
39523
39523
|
let pos2 = 65536;
|
|
39524
39524
|
for (let i = 0, length = set2.length; i < length; i += 2) {
|
|
@@ -39646,7 +39646,7 @@ function requireLib$1() {
|
|
|
39646
39646
|
if (!(bindingType & 1)) return !1;
|
|
39647
39647
|
if (bindingType & 8)
|
|
39648
39648
|
return scope2.names.has(name);
|
|
39649
|
-
const type2 = scope2.names.get(name);
|
|
39649
|
+
const type2 = scope2.names.get(name) || 0;
|
|
39650
39650
|
return bindingType & 16 ? (type2 & 2) > 0 || !this.treatFunctionsAsVarInScope(scope2) && (type2 & 1) > 0 : (type2 & 2) > 0 && !(scope2.flags & 8 && scope2.firstLexicalName === name) || !this.treatFunctionsAsVarInScope(scope2) && (type2 & 4) > 0;
|
|
39651
39651
|
}
|
|
39652
39652
|
checkLocalExport(id) {
|
|
@@ -39886,7 +39886,7 @@ function requireLib$1() {
|
|
|
39886
39886
|
return this.flowParseDeclareInterface(node);
|
|
39887
39887
|
if (this.match(82))
|
|
39888
39888
|
return this.flowParseDeclareExportDeclaration(node, insideModule);
|
|
39889
|
-
this.unexpected();
|
|
39889
|
+
throw this.unexpected();
|
|
39890
39890
|
}
|
|
39891
39891
|
flowParseDeclareVariable(node) {
|
|
39892
39892
|
return this.next(), node.id = this.flowParseTypeAnnotatableIdentifier(!0), this.scope.declareName(node.id.name, 5, node.id.loc.start), this.semicolon(), this.finishNode(node, "DeclareVariable");
|
|
@@ -39895,8 +39895,8 @@ function requireLib$1() {
|
|
|
39895
39895
|
this.scope.enter(0), this.match(134) ? node.id = super.parseExprAtom() : node.id = this.parseIdentifier();
|
|
39896
39896
|
const bodyNode = node.body = this.startNode(), body = bodyNode.body = [];
|
|
39897
39897
|
for (this.expect(5); !this.match(8); ) {
|
|
39898
|
-
|
|
39899
|
-
this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), super.parseImport(bodyNode2)) : (this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule),
|
|
39898
|
+
const bodyNode2 = this.startNode();
|
|
39899
|
+
this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), body.push(super.parseImport(bodyNode2))) : (this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule), body.push(this.flowParseDeclare(bodyNode2, !0)));
|
|
39900
39900
|
}
|
|
39901
39901
|
this.scope.exit(), this.expect(8), this.finishNode(bodyNode, "BlockStatement");
|
|
39902
39902
|
let kind = null, hasModuleExport = !1;
|
|
@@ -39918,7 +39918,7 @@ function requireLib$1() {
|
|
|
39918
39918
|
return node.declaration = this.flowParseDeclare(this.startNode()), node.default = !1, this.finishNode(node, "DeclareExportDeclaration");
|
|
39919
39919
|
if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131))
|
|
39920
39920
|
return node = this.parseExport(node, null), node.type === "ExportNamedDeclaration" ? (node.default = !1, delete node.exportKind, this.castNodeTo(node, "DeclareExportDeclaration")) : this.castNodeTo(node, "DeclareExportAllDeclaration");
|
|
39921
|
-
this.unexpected();
|
|
39921
|
+
throw this.unexpected();
|
|
39922
39922
|
}
|
|
39923
39923
|
flowParseDeclareModuleExports(node) {
|
|
39924
39924
|
return this.next(), this.expectContextual(111), node.typeAnnotation = this.flowParseTypeAnnotation(), this.semicolon(), this.finishNode(node, "DeclareModuleExports");
|
|
@@ -40024,7 +40024,7 @@ function requireLib$1() {
|
|
|
40024
40024
|
}), this.state.inType = oldInType, !this.state.inType && this.curContext() === types2.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(node, "TypeParameterInstantiation");
|
|
40025
40025
|
}
|
|
40026
40026
|
flowParseTypeParameterInstantiationCallOrNew() {
|
|
40027
|
-
if (this.reScan_lt() !== 47) return;
|
|
40027
|
+
if (this.reScan_lt() !== 47) return null;
|
|
40028
40028
|
const node = this.startNode(), oldInType = this.state.inType;
|
|
40029
40029
|
for (node.params = [], this.state.inType = !0, this.expect(47); !this.match(48); )
|
|
40030
40030
|
node.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12);
|
|
@@ -40239,8 +40239,7 @@ function requireLib$1() {
|
|
|
40239
40239
|
return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
|
|
40240
40240
|
throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
|
|
40241
40241
|
}
|
|
40242
|
-
this.unexpected();
|
|
40243
|
-
return;
|
|
40242
|
+
throw this.unexpected();
|
|
40244
40243
|
case 135:
|
|
40245
40244
|
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
|
|
40246
40245
|
case 136:
|
|
@@ -40262,7 +40261,7 @@ function requireLib$1() {
|
|
|
40262
40261
|
} else if (tokenIsIdentifier(this.state.type))
|
|
40263
40262
|
return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier());
|
|
40264
40263
|
}
|
|
40265
|
-
this.unexpected();
|
|
40264
|
+
throw this.unexpected();
|
|
40266
40265
|
}
|
|
40267
40266
|
flowParsePostfixType() {
|
|
40268
40267
|
const startLoc = this.state.startLoc;
|
|
@@ -40535,12 +40534,12 @@ function requireLib$1() {
|
|
|
40535
40534
|
}
|
|
40536
40535
|
return exprList;
|
|
40537
40536
|
}
|
|
40538
|
-
parseArrayLike(close,
|
|
40539
|
-
const node = super.parseArrayLike(close,
|
|
40540
|
-
return
|
|
40537
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
40538
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
40539
|
+
return refExpressionErrors != null && !this.state.maybeInArrowParameters && this.toReferencedList(node.elements), node;
|
|
40541
40540
|
}
|
|
40542
|
-
isValidLVal(type2, isParenthesized, binding) {
|
|
40543
|
-
return type2 === "TypeCastExpression" || super.isValidLVal(type2, isParenthesized, binding);
|
|
40541
|
+
isValidLVal(type2, disallowCallExpression, isParenthesized, binding) {
|
|
40542
|
+
return type2 === "TypeCastExpression" || super.isValidLVal(type2, disallowCallExpression, isParenthesized, binding);
|
|
40544
40543
|
}
|
|
40545
40544
|
parseClassProperty(node) {
|
|
40546
40545
|
return this.match(14) && (node.typeAnnotation = this.flowParseTypeAnnotation()), super.parseClassProperty(node);
|
|
@@ -41841,10 +41840,7 @@ function requireLib$1() {
|
|
|
41841
41840
|
if (commentWS.leadingNode !== null || commentWS.trailingNode !== null)
|
|
41842
41841
|
commentWS.leadingNode !== null && setTrailingComments(commentWS.leadingNode, comments2), commentWS.trailingNode !== null && setLeadingComments(commentWS.trailingNode, comments2);
|
|
41843
41842
|
else {
|
|
41844
|
-
const
|
|
41845
|
-
containingNode: node,
|
|
41846
|
-
start: commentStart
|
|
41847
|
-
} = commentWS;
|
|
41843
|
+
const node = commentWS.containingNode, commentStart = commentWS.start;
|
|
41848
41844
|
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44)
|
|
41849
41845
|
switch (node.type) {
|
|
41850
41846
|
case "ObjectExpression":
|
|
@@ -43319,7 +43315,7 @@ function requireLib$1() {
|
|
|
43319
43315
|
toAssignable(node, isLHS = !1) {
|
|
43320
43316
|
var _node$extra, _node$extra3;
|
|
43321
43317
|
let parenthesized;
|
|
43322
|
-
switch ((node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) && (parenthesized = unwrapParenthesizedExpression(node), isLHS ? parenthesized.type === "Identifier" ? this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node) : parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized) && this.raise(Errors.InvalidParenthesizedAssignment, node) : this.raise(Errors.InvalidParenthesizedAssignment, node)), node.type) {
|
|
43318
|
+
switch ((node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) && (parenthesized = unwrapParenthesizedExpression(node), isLHS ? parenthesized.type === "Identifier" ? this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node) : parenthesized.type !== "CallExpression" && parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized) && this.raise(Errors.InvalidParenthesizedAssignment, node) : this.raise(Errors.InvalidParenthesizedAssignment, node)), node.type) {
|
|
43323
43319
|
case "Identifier":
|
|
43324
43320
|
case "ObjectPattern":
|
|
43325
43321
|
case "ArrayPattern":
|
|
@@ -43493,7 +43489,7 @@ function requireLib$1() {
|
|
|
43493
43489
|
const node = this.startNodeAt(startLoc);
|
|
43494
43490
|
return left.type === "VoidPattern" && this.raise(Errors.VoidPatternInitializer, left), node.left = left, node.right = this.parseMaybeAssignAllowIn(), this.finishNode(node, "AssignmentPattern");
|
|
43495
43491
|
}
|
|
43496
|
-
isValidLVal(type2, isUnparenthesizedInAssign, binding) {
|
|
43492
|
+
isValidLVal(type2, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
43497
43493
|
switch (type2) {
|
|
43498
43494
|
case "AssignmentPattern":
|
|
43499
43495
|
return "left";
|
|
@@ -43509,13 +43505,16 @@ function requireLib$1() {
|
|
|
43509
43505
|
return "properties";
|
|
43510
43506
|
case "VoidPattern":
|
|
43511
43507
|
return !0;
|
|
43508
|
+
case "CallExpression":
|
|
43509
|
+
if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192)
|
|
43510
|
+
return !0;
|
|
43512
43511
|
}
|
|
43513
43512
|
return !1;
|
|
43514
43513
|
}
|
|
43515
43514
|
isOptionalMemberExpression(expression) {
|
|
43516
43515
|
return expression.type === "OptionalMemberExpression";
|
|
43517
43516
|
}
|
|
43518
|
-
checkLVal(expression, ancestor, binding = 64, checkClashes = !1, strictModeChanged = !1, hasParenthesizedAncestor = !1) {
|
|
43517
|
+
checkLVal(expression, ancestor, binding = 64, checkClashes = !1, strictModeChanged = !1, hasParenthesizedAncestor = !1, disallowCallExpression = !1) {
|
|
43519
43518
|
var _expression$extra;
|
|
43520
43519
|
const type2 = expression.type;
|
|
43521
43520
|
if (this.isObjectMethod(expression)) return;
|
|
@@ -43534,7 +43533,9 @@ function requireLib$1() {
|
|
|
43534
43533
|
checkClashes && (checkClashes.has(name) ? this.raise(Errors.ParamDupe, expression) : checkClashes.add(name));
|
|
43535
43534
|
return;
|
|
43536
43535
|
} else type2 === "VoidPattern" && ancestor.type === "CatchClause" && this.raise(Errors.VoidPatternCatchClauseParam, expression);
|
|
43537
|
-
const
|
|
43536
|
+
const unwrappedExpression = unwrapParenthesizedExpression(expression);
|
|
43537
|
+
disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super"));
|
|
43538
|
+
const validity = this.isValidLVal(type2, disallowCallExpression, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
|
|
43538
43539
|
if (validity === !0) return;
|
|
43539
43540
|
if (validity === !1) {
|
|
43540
43541
|
const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
|
|
@@ -43550,8 +43551,8 @@ function requireLib$1() {
|
|
|
43550
43551
|
} : ancestor, val = expression[key2];
|
|
43551
43552
|
if (Array.isArray(val))
|
|
43552
43553
|
for (const child of val)
|
|
43553
|
-
child && this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
43554
|
-
else val && this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
|
|
43554
|
+
child && this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, !0);
|
|
43555
|
+
else val && this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, disallowCallExpression);
|
|
43555
43556
|
}
|
|
43556
43557
|
checkIdentifier(at, bindingType, strictModeChanged = !1) {
|
|
43557
43558
|
this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name)) && (bindingType === 64 ? this.raise(Errors.StrictEvalArguments, at, {
|
|
@@ -43582,6 +43583,7 @@ function requireLib$1() {
|
|
|
43582
43583
|
return this.match(12) ? (this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, this.state.startLoc), !0) : !1;
|
|
43583
43584
|
}
|
|
43584
43585
|
}
|
|
43586
|
+
const keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
|
|
43585
43587
|
function nonNull(x) {
|
|
43586
43588
|
if (x == null)
|
|
43587
43589
|
throw new Error(`Unexpected ${x} value.`);
|
|
@@ -44122,7 +44124,7 @@ function requireLib$1() {
|
|
|
44122
44124
|
}
|
|
44123
44125
|
}
|
|
44124
44126
|
}
|
|
44125
|
-
this.unexpected();
|
|
44127
|
+
throw this.unexpected();
|
|
44126
44128
|
}
|
|
44127
44129
|
tsParseArrayTypeOrHigher() {
|
|
44128
44130
|
const {
|
|
@@ -44449,37 +44451,20 @@ function requireLib$1() {
|
|
|
44449
44451
|
}
|
|
44450
44452
|
default:
|
|
44451
44453
|
if (tokenIsIdentifier(startType))
|
|
44452
|
-
return this.tsParseDeclaration(node, this.state.
|
|
44454
|
+
return this.tsParseDeclaration(node, this.state.type, !0, null);
|
|
44453
44455
|
}
|
|
44454
44456
|
});
|
|
44455
44457
|
}
|
|
44456
44458
|
tsTryParseExportDeclaration() {
|
|
44457
|
-
return this.tsParseDeclaration(this.startNode(), this.state.
|
|
44458
|
-
}
|
|
44459
|
-
tsParseExpressionStatement(node, expr, decorators) {
|
|
44460
|
-
switch (expr.name) {
|
|
44461
|
-
case "declare": {
|
|
44462
|
-
const declaration = this.tsTryParseDeclare(node);
|
|
44463
|
-
return declaration && (declaration.declare = !0), declaration;
|
|
44464
|
-
}
|
|
44465
|
-
case "global":
|
|
44466
|
-
if (this.match(5)) {
|
|
44467
|
-
this.scope.enter(1024), this.prodParam.enter(0);
|
|
44468
|
-
const mod = node;
|
|
44469
|
-
return mod.kind = "global", node.global = !0, mod.id = expr, mod.body = this.tsParseModuleBlock(), this.scope.exit(), this.prodParam.exit(), this.finishNode(mod, "TSModuleDeclaration");
|
|
44470
|
-
}
|
|
44471
|
-
break;
|
|
44472
|
-
default:
|
|
44473
|
-
return this.tsParseDeclaration(node, expr.name, !1, decorators);
|
|
44474
|
-
}
|
|
44459
|
+
return this.tsParseDeclaration(this.startNode(), this.state.type, !0, null);
|
|
44475
44460
|
}
|
|
44476
|
-
tsParseDeclaration(node,
|
|
44477
|
-
switch (
|
|
44478
|
-
case
|
|
44461
|
+
tsParseDeclaration(node, type2, next, decorators) {
|
|
44462
|
+
switch (type2) {
|
|
44463
|
+
case 124:
|
|
44479
44464
|
if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type)))
|
|
44480
44465
|
return this.tsParseAbstractDeclaration(node, decorators);
|
|
44481
44466
|
break;
|
|
44482
|
-
case
|
|
44467
|
+
case 127:
|
|
44483
44468
|
if (this.tsCheckLineTerminator(next)) {
|
|
44484
44469
|
if (this.match(134))
|
|
44485
44470
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
@@ -44487,11 +44472,11 @@ function requireLib$1() {
|
|
|
44487
44472
|
return node.kind = "module", this.tsParseModuleOrNamespaceDeclaration(node);
|
|
44488
44473
|
}
|
|
44489
44474
|
break;
|
|
44490
|
-
case
|
|
44475
|
+
case 128:
|
|
44491
44476
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type))
|
|
44492
44477
|
return node.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(node);
|
|
44493
44478
|
break;
|
|
44494
|
-
case
|
|
44479
|
+
case 130:
|
|
44495
44480
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type))
|
|
44496
44481
|
return this.tsParseTypeAliasDeclaration(node);
|
|
44497
44482
|
break;
|
|
@@ -44567,8 +44552,8 @@ function requireLib$1() {
|
|
|
44567
44552
|
toReferencedList(exprList, isInParens) {
|
|
44568
44553
|
return this.tsCheckForInvalidTypeCasts(exprList), exprList;
|
|
44569
44554
|
}
|
|
44570
|
-
parseArrayLike(close,
|
|
44571
|
-
const node = super.parseArrayLike(close,
|
|
44555
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
44556
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
44572
44557
|
return node.type === "ArrayExpression" && this.tsCheckForInvalidTypeCasts(node.elements), node;
|
|
44573
44558
|
}
|
|
44574
44559
|
parseSubscript(base2, startLoc, noCalls, state) {
|
|
@@ -44712,18 +44697,63 @@ function requireLib$1() {
|
|
|
44712
44697
|
return declaration;
|
|
44713
44698
|
}
|
|
44714
44699
|
parseStatementContent(flags, decorators) {
|
|
44715
|
-
if (this.
|
|
44716
|
-
|
|
44717
|
-
|
|
44718
|
-
|
|
44719
|
-
|
|
44720
|
-
|
|
44721
|
-
|
|
44722
|
-
|
|
44723
|
-
|
|
44724
|
-
|
|
44725
|
-
|
|
44726
|
-
|
|
44700
|
+
if (!this.state.containsEsc)
|
|
44701
|
+
switch (this.state.type) {
|
|
44702
|
+
case 75: {
|
|
44703
|
+
if (this.isLookaheadContextual("enum")) {
|
|
44704
|
+
const node = this.startNode();
|
|
44705
|
+
return this.expect(75), this.tsParseEnumDeclaration(node, {
|
|
44706
|
+
const: !0
|
|
44707
|
+
});
|
|
44708
|
+
}
|
|
44709
|
+
break;
|
|
44710
|
+
}
|
|
44711
|
+
case 124:
|
|
44712
|
+
case 125: {
|
|
44713
|
+
if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
|
|
44714
|
+
const token2 = this.state.type, node = this.startNode();
|
|
44715
|
+
this.next();
|
|
44716
|
+
const declaration = token2 === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
|
|
44717
|
+
return declaration ? (token2 === 125 && (declaration.declare = !0), declaration) : (node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token2 === 125 ? "declare" : "abstract"), this.semicolon(!1), this.finishNode(node, "ExpressionStatement"));
|
|
44718
|
+
}
|
|
44719
|
+
break;
|
|
44720
|
+
}
|
|
44721
|
+
case 126:
|
|
44722
|
+
return this.tsParseEnumDeclaration(this.startNode());
|
|
44723
|
+
case 112: {
|
|
44724
|
+
if (this.lookaheadCharCode() === 123) {
|
|
44725
|
+
const node = this.startNode();
|
|
44726
|
+
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
44727
|
+
}
|
|
44728
|
+
break;
|
|
44729
|
+
}
|
|
44730
|
+
case 129: {
|
|
44731
|
+
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
44732
|
+
if (result) return result;
|
|
44733
|
+
break;
|
|
44734
|
+
}
|
|
44735
|
+
case 127: {
|
|
44736
|
+
if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
|
|
44737
|
+
const node = this.startNode();
|
|
44738
|
+
return this.next(), this.tsParseDeclaration(node, 127, !1, decorators);
|
|
44739
|
+
}
|
|
44740
|
+
break;
|
|
44741
|
+
}
|
|
44742
|
+
case 128: {
|
|
44743
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
44744
|
+
const node = this.startNode();
|
|
44745
|
+
return this.next(), this.tsParseDeclaration(node, 128, !1, decorators);
|
|
44746
|
+
}
|
|
44747
|
+
break;
|
|
44748
|
+
}
|
|
44749
|
+
case 130: {
|
|
44750
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
44751
|
+
const node = this.startNode();
|
|
44752
|
+
return this.next(), this.tsParseTypeAliasDeclaration(node);
|
|
44753
|
+
}
|
|
44754
|
+
break;
|
|
44755
|
+
}
|
|
44756
|
+
}
|
|
44727
44757
|
return super.parseStatementContent(flags, decorators);
|
|
44728
44758
|
}
|
|
44729
44759
|
parseAccessModifier() {
|
|
@@ -44761,9 +44791,6 @@ function requireLib$1() {
|
|
|
44761
44791
|
parsePostMemberNameModifiers(methodOrProp) {
|
|
44762
44792
|
this.eat(17) && (methodOrProp.optional = !0), methodOrProp.readonly && this.match(10) && this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp), methodOrProp.declare && this.match(10) && this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp);
|
|
44763
44793
|
}
|
|
44764
|
-
parseExpressionStatement(node, expr, decorators) {
|
|
44765
|
-
return (expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : void 0) || super.parseExpressionStatement(node, expr, decorators);
|
|
44766
|
-
}
|
|
44767
44794
|
shouldParseExportDeclaration() {
|
|
44768
44795
|
return this.tsIsDeclarationStart() ? !0 : super.shouldParseExportDeclaration();
|
|
44769
44796
|
}
|
|
@@ -44968,7 +44995,7 @@ function requireLib$1() {
|
|
|
44968
44995
|
super.checkToRestConversion(node, allowPattern);
|
|
44969
44996
|
}
|
|
44970
44997
|
}
|
|
44971
|
-
isValidLVal(type2, isUnparenthesizedInAssign, binding) {
|
|
44998
|
+
isValidLVal(type2, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
44972
44999
|
switch (type2) {
|
|
44973
45000
|
case "TSTypeCastExpression":
|
|
44974
45001
|
return !0;
|
|
@@ -44981,7 +45008,7 @@ function requireLib$1() {
|
|
|
44981
45008
|
case "TSTypeAssertion":
|
|
44982
45009
|
return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", !0];
|
|
44983
45010
|
default:
|
|
44984
|
-
return super.isValidLVal(type2, isUnparenthesizedInAssign, binding);
|
|
45011
|
+
return super.isValidLVal(type2, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
44985
45012
|
}
|
|
44986
45013
|
}
|
|
44987
45014
|
parseBindingAtom() {
|
|
@@ -45091,11 +45118,9 @@ function requireLib$1() {
|
|
|
45091
45118
|
tsParseAbstractDeclaration(node, decorators) {
|
|
45092
45119
|
if (this.match(80))
|
|
45093
45120
|
return node.abstract = !0, this.maybeTakeDecorators(decorators, this.parseClass(node, !0, !1));
|
|
45094
|
-
if (this.isContextual(129))
|
|
45095
|
-
|
|
45096
|
-
|
|
45097
|
-
} else
|
|
45098
|
-
this.unexpected(null, 80);
|
|
45121
|
+
if (this.isContextual(129))
|
|
45122
|
+
return this.hasFollowingLineBreak() ? null : (node.abstract = !0, this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node), this.tsParseInterfaceDeclaration(node));
|
|
45123
|
+
throw this.unexpected(null, 80);
|
|
45099
45124
|
}
|
|
45100
45125
|
parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type2, inClassScope) {
|
|
45101
45126
|
const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type2, inClassScope);
|
|
@@ -45221,6 +45246,24 @@ function requireLib$1() {
|
|
|
45221
45246
|
return;
|
|
45222
45247
|
}
|
|
45223
45248
|
}
|
|
45249
|
+
chStartsBindingIdentifierAndNotRelationalOperator(ch, pos2) {
|
|
45250
|
+
if (isIdentifierStart(ch)) {
|
|
45251
|
+
if (keywordAndTSRelationalOperator.lastIndex = pos2, keywordAndTSRelationalOperator.test(this.input)) {
|
|
45252
|
+
const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
|
|
45253
|
+
if (!isIdentifierChar(endCh) && endCh !== 92)
|
|
45254
|
+
return !1;
|
|
45255
|
+
}
|
|
45256
|
+
return !0;
|
|
45257
|
+
} else return ch === 92;
|
|
45258
|
+
}
|
|
45259
|
+
nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
|
|
45260
|
+
const next = this.nextTokenInLineStart(), nextCh = this.codePointAtPos(next);
|
|
45261
|
+
return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
|
|
45262
|
+
}
|
|
45263
|
+
nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
45264
|
+
const next = this.nextTokenInLineStart(), nextCh = this.codePointAtPos(next);
|
|
45265
|
+
return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
|
|
45266
|
+
}
|
|
45224
45267
|
};
|
|
45225
45268
|
function isPossiblyLiteralEnum(expression) {
|
|
45226
45269
|
if (expression.type !== "MemberExpression") return !1;
|
|
@@ -45303,8 +45346,8 @@ function requireLib$1() {
|
|
|
45303
45346
|
parseBindingAtom() {
|
|
45304
45347
|
return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
|
|
45305
45348
|
}
|
|
45306
|
-
isValidLVal(type2, isParenthesized, binding) {
|
|
45307
|
-
return type2 === "Placeholder" || super.isValidLVal(type2, isParenthesized, binding);
|
|
45349
|
+
isValidLVal(type2, disallowCallExpression, isParenthesized, binding) {
|
|
45350
|
+
return type2 === "Placeholder" || super.isValidLVal(type2, disallowCallExpression, isParenthesized, binding);
|
|
45308
45351
|
}
|
|
45309
45352
|
toAssignable(node, isLHS) {
|
|
45310
45353
|
node && node.type === "Placeholder" && node.expectedNode === "Expression" ? node.expectedNode = "Pattern" : super.toAssignable(node, isLHS);
|
|
@@ -45548,7 +45591,7 @@ function requireLib$1() {
|
|
|
45548
45591
|
refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex && (refExpressionErrors.doubleProtoLoc = null), refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex && (refExpressionErrors.shorthandAssignLoc = null), refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex && (this.checkDestructuringPrivate(refExpressionErrors), refExpressionErrors.privateKeyLoc = null), refExpressionErrors.voidPatternLoc != null && refExpressionErrors.voidPatternLoc.index >= startIndex && (refExpressionErrors.voidPatternLoc = null);
|
|
45549
45592
|
} else
|
|
45550
45593
|
node.left = left;
|
|
45551
|
-
return this.next(), node.right = this.parseMaybeAssign(), this.checkLVal(left, this.finishNode(node, "AssignmentExpression")), node;
|
|
45594
|
+
return this.next(), node.right = this.parseMaybeAssign(), this.checkLVal(left, this.finishNode(node, "AssignmentExpression"), void 0, void 0, void 0, void 0, operator === "||=" || operator === "&&=" || operator === "??="), node;
|
|
45552
45595
|
} else ownExpressionErrors && this.checkExpressionErrors(refExpressionErrors, !0);
|
|
45553
45596
|
if (isYield) {
|
|
45554
45597
|
const {
|
|
@@ -45827,7 +45870,7 @@ function requireLib$1() {
|
|
|
45827
45870
|
return this.parseParenAndDistinguishExpression(canBeArrow);
|
|
45828
45871
|
}
|
|
45829
45872
|
case 0:
|
|
45830
|
-
return this.parseArrayLike(3, !
|
|
45873
|
+
return this.parseArrayLike(3, !1, refExpressionErrors);
|
|
45831
45874
|
case 5:
|
|
45832
45875
|
return this.parseObjectLike(8, !1, !1, refExpressionErrors);
|
|
45833
45876
|
case 68:
|
|
@@ -45865,20 +45908,18 @@ function requireLib$1() {
|
|
|
45865
45908
|
const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
|
|
45866
45909
|
if (pipeProposal)
|
|
45867
45910
|
return this.parseTopicReference(pipeProposal);
|
|
45868
|
-
this.unexpected();
|
|
45869
|
-
break;
|
|
45911
|
+
throw this.unexpected();
|
|
45870
45912
|
}
|
|
45871
45913
|
case 47: {
|
|
45872
45914
|
const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
|
|
45873
|
-
isIdentifierStart(lookaheadCh) || lookaheadCh === 62 ? this.expectOnePlugin(["jsx", "flow", "typescript"]) : this.unexpected();
|
|
45874
|
-
break;
|
|
45915
|
+
throw isIdentifierStart(lookaheadCh) || lookaheadCh === 62 ? this.expectOnePlugin(["jsx", "flow", "typescript"]) : this.unexpected();
|
|
45875
45916
|
}
|
|
45876
45917
|
default:
|
|
45877
45918
|
{
|
|
45878
45919
|
if (type2 === 137)
|
|
45879
45920
|
return this.parseDecimalLiteral(this.state.value);
|
|
45880
45921
|
if (type2 === 2 || type2 === 1)
|
|
45881
|
-
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !
|
|
45922
|
+
return this.parseArrayLike(this.state.type === 2 ? 4 : 3, !0);
|
|
45882
45923
|
if (type2 === 6 || type2 === 7)
|
|
45883
45924
|
return this.parseObjectLike(this.state.type === 6 ? 9 : 8, !1, !0);
|
|
45884
45925
|
}
|
|
@@ -45899,14 +45940,14 @@ function requireLib$1() {
|
|
|
45899
45940
|
}
|
|
45900
45941
|
return canBeArrow && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(id), [id], !1)) : id;
|
|
45901
45942
|
} else
|
|
45902
|
-
this.unexpected();
|
|
45943
|
+
throw this.unexpected();
|
|
45903
45944
|
}
|
|
45904
45945
|
}
|
|
45905
45946
|
parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) {
|
|
45906
45947
|
const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
|
|
45907
45948
|
if (pipeProposal)
|
|
45908
45949
|
return this.state.type = topicTokenType, this.state.value = topicTokenValue, this.state.pos--, this.state.end--, this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1), this.parseTopicReference(pipeProposal);
|
|
45909
|
-
this.unexpected();
|
|
45950
|
+
throw this.unexpected();
|
|
45910
45951
|
}
|
|
45911
45952
|
parseTopicReference(pipeProposal) {
|
|
45912
45953
|
const node = this.startNode(), startLoc = this.state.startLoc, tokenType = this.state.type;
|
|
@@ -45943,7 +45984,7 @@ function requireLib$1() {
|
|
|
45943
45984
|
}
|
|
45944
45985
|
parseSuper() {
|
|
45945
45986
|
const node = this.startNode();
|
|
45946
|
-
return this.next(), this.match(10) && !this.scope.allowDirectSuper
|
|
45987
|
+
return this.next(), this.match(10) && !this.scope.allowDirectSuper ? this.optionFlags & 16 || this.raise(Errors.SuperNotAllowed, node) : this.scope.allowSuper || this.optionFlags & 16 || this.raise(Errors.UnexpectedSuper, node), !this.match(10) && !this.match(0) && !this.match(16) && this.raise(Errors.UnsupportedSuper, node), this.finishNode(node, "Super");
|
|
45947
45988
|
}
|
|
45948
45989
|
parsePrivateName() {
|
|
45949
45990
|
const node = this.startNode(), id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)), name = this.state.value;
|
|
@@ -46232,7 +46273,7 @@ function requireLib$1() {
|
|
|
46232
46273
|
const finishedNode = this.parseFunctionBodyAndFinish(node, type2, !0);
|
|
46233
46274
|
return this.prodParam.exit(), this.scope.exit(), finishedNode;
|
|
46234
46275
|
}
|
|
46235
|
-
parseArrayLike(close,
|
|
46276
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
46236
46277
|
isTuple && this.expectPlugin("recordAndTuple");
|
|
46237
46278
|
const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
|
|
46238
46279
|
this.state.inFSharpPipelineDirectBody = !1;
|
|
@@ -46674,10 +46715,7 @@ function requireLib$1() {
|
|
|
46674
46715
|
return this.isContextual(100) ? this.hasFollowingBindingAtom() : !1;
|
|
46675
46716
|
}
|
|
46676
46717
|
isUsing() {
|
|
46677
|
-
|
|
46678
|
-
return !1;
|
|
46679
|
-
const next = this.nextTokenInLineStart(), nextCh = this.codePointAtPos(next);
|
|
46680
|
-
return this.chStartsBindingIdentifier(nextCh, next);
|
|
46718
|
+
return this.isContextual(107) ? this.nextTokenIsIdentifierOnSameLine() : !1;
|
|
46681
46719
|
}
|
|
46682
46720
|
isForUsing() {
|
|
46683
46721
|
if (!this.isContextual(107))
|
|
@@ -46690,6 +46728,10 @@ function requireLib$1() {
|
|
|
46690
46728
|
}
|
|
46691
46729
|
return !!(this.chStartsBindingIdentifier(nextCh, next) || this.isUnparsedContextual(next, "void"));
|
|
46692
46730
|
}
|
|
46731
|
+
nextTokenIsIdentifierOnSameLine() {
|
|
46732
|
+
const next = this.nextTokenInLineStart(), nextCh = this.codePointAtPos(next);
|
|
46733
|
+
return this.chStartsBindingIdentifier(nextCh, next);
|
|
46734
|
+
}
|
|
46693
46735
|
isAwaitUsing() {
|
|
46694
46736
|
if (!this.isContextual(96))
|
|
46695
46737
|
return !1;
|
|
@@ -47286,7 +47328,7 @@ function requireLib$1() {
|
|
|
47286
47328
|
throw this.raise(Errors.UnsupportedDecoratorExport, node);
|
|
47287
47329
|
return this.checkExport(node2, !0, !0), this.sawUnambiguousESM = !0, this.finishNode(node2, "ExportDefaultDeclaration");
|
|
47288
47330
|
}
|
|
47289
|
-
this.unexpected(null, 5);
|
|
47331
|
+
throw this.unexpected(null, 5);
|
|
47290
47332
|
}
|
|
47291
47333
|
eatExportStar(node) {
|
|
47292
47334
|
return this.eat(55);
|
|
@@ -47619,9 +47661,10 @@ function requireLib$1() {
|
|
|
47619
47661
|
}
|
|
47620
47662
|
class Parser extends StatementParser {
|
|
47621
47663
|
constructor(options2, input2, pluginsMap) {
|
|
47622
|
-
|
|
47664
|
+
const normalizedOptions = getOptions(options2);
|
|
47665
|
+
super(normalizedOptions, input2), this.options = normalizedOptions, this.initializeScopes(), this.plugins = pluginsMap, this.filename = normalizedOptions.sourceFilename, this.startIndex = normalizedOptions.startIndex;
|
|
47623
47666
|
let optionFlags = 0;
|
|
47624
|
-
|
|
47667
|
+
normalizedOptions.allowAwaitOutsideFunction && (optionFlags |= 1), normalizedOptions.allowReturnOutsideFunction && (optionFlags |= 2), normalizedOptions.allowImportExportEverywhere && (optionFlags |= 8), normalizedOptions.allowSuperOutsideMethod && (optionFlags |= 16), normalizedOptions.allowUndeclaredExports && (optionFlags |= 64), normalizedOptions.allowNewTargetOutsideFunction && (optionFlags |= 4), normalizedOptions.allowYieldOutsideFunction && (optionFlags |= 32), normalizedOptions.ranges && (optionFlags |= 128), normalizedOptions.tokens && (optionFlags |= 256), normalizedOptions.createImportExpressions && (optionFlags |= 512), normalizedOptions.createParenthesizedExpressions && (optionFlags |= 1024), normalizedOptions.errorRecovery && (optionFlags |= 2048), normalizedOptions.attachComment && (optionFlags |= 4096), normalizedOptions.annexB && (optionFlags |= 8192), this.optionFlags = optionFlags;
|
|
47625
47668
|
}
|
|
47626
47669
|
getScopeHandler() {
|
|
47627
47670
|
return ScopeHandler;
|
|
@@ -47629,7 +47672,9 @@ function requireLib$1() {
|
|
|
47629
47672
|
parse() {
|
|
47630
47673
|
this.enterInitialScopes();
|
|
47631
47674
|
const file = this.startNode(), program = this.startNode();
|
|
47632
|
-
|
|
47675
|
+
this.nextToken(), file.errors = null;
|
|
47676
|
+
const result = this.parseTopLevel(file, program);
|
|
47677
|
+
return result.errors = this.state.errors, result.comments.length = this.state.commentsLen, result;
|
|
47633
47678
|
}
|
|
47634
47679
|
}
|
|
47635
47680
|
function parse3(input2, options2) {
|