@dpuse/dpuse-development 0.3.708 → 0.3.709
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/README.md +8 -8
- package/dist/dpuse-development.es.js +541 -527
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ var l = Object.defineProperty, u = /* @__PURE__ */ ((e, t) => {
|
|
|
19
19
|
Position: () => _e,
|
|
20
20
|
SourceLocation: () => ve,
|
|
21
21
|
TokContext: () => P,
|
|
22
|
-
Token: () =>
|
|
22
|
+
Token: () => Xt,
|
|
23
23
|
TokenType: () => x,
|
|
24
24
|
defaultOptions: () => be,
|
|
25
25
|
getLineInfo: () => ye,
|
|
@@ -30,12 +30,12 @@ var l = Object.defineProperty, u = /* @__PURE__ */ ((e, t) => {
|
|
|
30
30
|
lineBreak: () => D,
|
|
31
31
|
lineBreakG: () => ie,
|
|
32
32
|
nonASCIIwhitespace: () => se,
|
|
33
|
-
parse: () =>
|
|
34
|
-
parseExpressionAt: () =>
|
|
33
|
+
parse: () => tn,
|
|
34
|
+
parseExpressionAt: () => nn,
|
|
35
35
|
tokContexts: () => F,
|
|
36
36
|
tokTypes: () => E,
|
|
37
|
-
tokenizer: () =>
|
|
38
|
-
version: () =>
|
|
37
|
+
tokenizer: () => rn,
|
|
38
|
+
version: () => en
|
|
39
39
|
}), d = [
|
|
40
40
|
509,
|
|
41
41
|
0,
|
|
@@ -2438,15 +2438,15 @@ kt.prototype.separatedFrom = function(e) {
|
|
|
2438
2438
|
}, kt.prototype.sibling = function() {
|
|
2439
2439
|
return new kt(this.parent, this.base);
|
|
2440
2440
|
};
|
|
2441
|
-
var
|
|
2441
|
+
var At = function(e) {
|
|
2442
2442
|
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = wt[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2443
2443
|
};
|
|
2444
|
-
|
|
2444
|
+
At.prototype.reset = function(e, t, n) {
|
|
2445
2445
|
var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
|
|
2446
2446
|
this.start = e | 0, this.source = t + "", this.flags = n, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = i && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = i && this.parser.options.ecmaVersion >= 9);
|
|
2447
|
-
},
|
|
2447
|
+
}, At.prototype.raise = function(e) {
|
|
2448
2448
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
2449
|
-
},
|
|
2449
|
+
}, At.prototype.at = function(e, t) {
|
|
2450
2450
|
t === void 0 && (t = !1);
|
|
2451
2451
|
var n = this.source, r = n.length;
|
|
2452
2452
|
if (e >= r) return -1;
|
|
@@ -2454,21 +2454,21 @@ R.prototype.reset = function(e, t, n) {
|
|
|
2454
2454
|
if (!(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r) return i;
|
|
2455
2455
|
var a = n.charCodeAt(e + 1);
|
|
2456
2456
|
return a >= 56320 && a <= 57343 ? (i << 10) + a - 56613888 : i;
|
|
2457
|
-
},
|
|
2457
|
+
}, At.prototype.nextIndex = function(e, t) {
|
|
2458
2458
|
t === void 0 && (t = !1);
|
|
2459
2459
|
var n = this.source, r = n.length;
|
|
2460
2460
|
if (e >= r) return r;
|
|
2461
2461
|
var i = n.charCodeAt(e), a;
|
|
2462
2462
|
return !(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r || (a = n.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
|
|
2463
|
-
},
|
|
2463
|
+
}, At.prototype.current = function(e) {
|
|
2464
2464
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
2465
|
-
},
|
|
2465
|
+
}, At.prototype.lookahead = function(e) {
|
|
2466
2466
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
2467
|
-
},
|
|
2467
|
+
}, At.prototype.advance = function(e) {
|
|
2468
2468
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
2469
|
-
},
|
|
2469
|
+
}, At.prototype.eat = function(e, t) {
|
|
2470
2470
|
return t === void 0 && (t = !1), this.current(t) === e && (this.advance(t), !0);
|
|
2471
|
-
},
|
|
2471
|
+
}, At.prototype.eatChars = function(e, t) {
|
|
2472
2472
|
t === void 0 && (t = !1);
|
|
2473
2473
|
for (var n = this.pos, r = 0, i = e; r < i.length; r += 1) {
|
|
2474
2474
|
var a = i[r], o = this.at(n, t);
|
|
@@ -2483,12 +2483,12 @@ R.prototype.reset = function(e, t, n) {
|
|
|
2483
2483
|
}
|
|
2484
2484
|
this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
|
|
2485
2485
|
};
|
|
2486
|
-
function
|
|
2486
|
+
function jt(e) {
|
|
2487
2487
|
for (var t in e) return !0;
|
|
2488
2488
|
return !1;
|
|
2489
2489
|
}
|
|
2490
2490
|
L.validateRegExpPattern = function(e) {
|
|
2491
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
2491
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && jt(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2492
2492
|
}, L.regexp_pattern = function(e) {
|
|
2493
2493
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
2494
2494
|
for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
|
|
@@ -2572,10 +2572,10 @@ L.validateRegExpPattern = function(e) {
|
|
|
2572
2572
|
}
|
|
2573
2573
|
return !1;
|
|
2574
2574
|
}, L.regexp_eatModifiers = function(e) {
|
|
2575
|
-
for (var t = "", n = 0; (n = e.current()) !== -1 &&
|
|
2575
|
+
for (var t = "", n = 0; (n = e.current()) !== -1 && Mt(n);) t += he(n), e.advance();
|
|
2576
2576
|
return t;
|
|
2577
2577
|
};
|
|
2578
|
-
function
|
|
2578
|
+
function Mt(e) {
|
|
2579
2579
|
return e === 105 || e === 109 || e === 115;
|
|
2580
2580
|
}
|
|
2581
2581
|
L.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2584,13 +2584,13 @@ L.regexp_eatExtendedAtom = function(e) {
|
|
|
2584
2584
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2585
2585
|
}, L.regexp_eatSyntaxCharacter = function(e) {
|
|
2586
2586
|
var t = e.current();
|
|
2587
|
-
return
|
|
2587
|
+
return Nt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2588
2588
|
};
|
|
2589
|
-
function
|
|
2589
|
+
function Nt(e) {
|
|
2590
2590
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2591
2591
|
}
|
|
2592
2592
|
L.regexp_eatPatternCharacters = function(e) {
|
|
2593
|
-
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !
|
|
2593
|
+
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !Nt(n);) e.advance();
|
|
2594
2594
|
return e.pos !== t;
|
|
2595
2595
|
}, L.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2596
2596
|
var t = e.current();
|
|
@@ -2619,16 +2619,16 @@ L.regexp_eatPatternCharacters = function(e) {
|
|
|
2619
2619
|
return !1;
|
|
2620
2620
|
}, L.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2621
2621
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2622
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2622
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Pt(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2623
2623
|
};
|
|
2624
|
-
function
|
|
2624
|
+
function Pt(e) {
|
|
2625
2625
|
return y(e, !0) || e === 36 || e === 95;
|
|
2626
2626
|
}
|
|
2627
2627
|
L.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2628
2628
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2629
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2629
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Ft(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2630
2630
|
};
|
|
2631
|
-
function
|
|
2631
|
+
function Ft(e) {
|
|
2632
2632
|
return b(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2633
2633
|
}
|
|
2634
2634
|
L.regexp_eatAtomEscape = function(e) {
|
|
@@ -2658,15 +2658,15 @@ L.regexp_eatAtomEscape = function(e) {
|
|
|
2658
2658
|
}
|
|
2659
2659
|
return !1;
|
|
2660
2660
|
}, L.regexp_eatZero = function(e) {
|
|
2661
|
-
return e.current() === 48 && !
|
|
2661
|
+
return e.current() === 48 && !Kt(e.lookahead()) && (e.lastIntValue = 0, e.advance(), !0);
|
|
2662
2662
|
}, L.regexp_eatControlEscape = function(e) {
|
|
2663
2663
|
var t = e.current();
|
|
2664
2664
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 && (e.lastIntValue = 13, e.advance(), !0);
|
|
2665
2665
|
}, L.regexp_eatControlLetter = function(e) {
|
|
2666
2666
|
var t = e.current();
|
|
2667
|
-
return
|
|
2667
|
+
return It(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2668
2668
|
};
|
|
2669
|
-
function
|
|
2669
|
+
function It(e) {
|
|
2670
2670
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2671
2671
|
}
|
|
2672
2672
|
L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2685,12 +2685,12 @@ L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
return !0;
|
|
2687
2687
|
}
|
|
2688
|
-
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
2688
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && Lt(e.lastIntValue)) return !0;
|
|
2689
2689
|
r && e.raise("Invalid unicode escape"), e.pos = n;
|
|
2690
2690
|
}
|
|
2691
2691
|
return !1;
|
|
2692
2692
|
};
|
|
2693
|
-
function
|
|
2693
|
+
function Lt(e) {
|
|
2694
2694
|
return e >= 0 && e <= 1114111;
|
|
2695
2695
|
}
|
|
2696
2696
|
L.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2708,20 +2708,20 @@ L.regexp_eatIdentityEscape = function(e) {
|
|
|
2708
2708
|
}
|
|
2709
2709
|
return !1;
|
|
2710
2710
|
};
|
|
2711
|
-
var
|
|
2711
|
+
var Rt = 0, zt = 1, R = 2;
|
|
2712
2712
|
L.regexp_eatCharacterClassEscape = function(e) {
|
|
2713
2713
|
var t = e.current();
|
|
2714
|
-
if (
|
|
2714
|
+
if (Bt(t)) return e.lastIntValue = -1, e.advance(), zt;
|
|
2715
2715
|
var n = !1;
|
|
2716
2716
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
|
|
2717
2717
|
e.lastIntValue = -1, e.advance();
|
|
2718
2718
|
var r;
|
|
2719
|
-
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r ===
|
|
2719
|
+
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === R && e.raise("Invalid property name"), r;
|
|
2720
2720
|
e.raise("Invalid property name");
|
|
2721
2721
|
}
|
|
2722
|
-
return
|
|
2722
|
+
return Rt;
|
|
2723
2723
|
};
|
|
2724
|
-
function
|
|
2724
|
+
function Bt(e) {
|
|
2725
2725
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2726
2726
|
}
|
|
2727
2727
|
L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -2730,46 +2730,46 @@ L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2730
2730
|
var n = e.lastStringValue;
|
|
2731
2731
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2732
2732
|
var r = e.lastStringValue;
|
|
2733
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r),
|
|
2733
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), zt;
|
|
2734
2734
|
}
|
|
2735
2735
|
}
|
|
2736
2736
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2737
2737
|
var i = e.lastStringValue;
|
|
2738
2738
|
return this.regexp_validateUnicodePropertyNameOrValue(e, i);
|
|
2739
2739
|
}
|
|
2740
|
-
return
|
|
2740
|
+
return Rt;
|
|
2741
2741
|
}, L.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
|
|
2742
2742
|
de(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
|
|
2743
2743
|
}, L.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2744
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
2745
|
-
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return
|
|
2744
|
+
if (e.unicodeProperties.binary.test(t)) return zt;
|
|
2745
|
+
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return R;
|
|
2746
2746
|
e.raise("Invalid property name");
|
|
2747
2747
|
}, L.regexp_eatUnicodePropertyName = function(e) {
|
|
2748
2748
|
var t = 0;
|
|
2749
|
-
for (e.lastStringValue = "";
|
|
2749
|
+
for (e.lastStringValue = ""; Vt(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2750
2750
|
return e.lastStringValue !== "";
|
|
2751
2751
|
};
|
|
2752
|
-
function
|
|
2753
|
-
return
|
|
2752
|
+
function Vt(e) {
|
|
2753
|
+
return It(e) || e === 95;
|
|
2754
2754
|
}
|
|
2755
2755
|
L.regexp_eatUnicodePropertyValue = function(e) {
|
|
2756
2756
|
var t = 0;
|
|
2757
|
-
for (e.lastStringValue = "";
|
|
2757
|
+
for (e.lastStringValue = ""; Ht(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2758
2758
|
return e.lastStringValue !== "";
|
|
2759
2759
|
};
|
|
2760
|
-
function
|
|
2761
|
-
return
|
|
2760
|
+
function Ht(e) {
|
|
2761
|
+
return Vt(e) || Kt(e);
|
|
2762
2762
|
}
|
|
2763
2763
|
L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2764
2764
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
2765
2765
|
}, L.regexp_eatCharacterClass = function(e) {
|
|
2766
2766
|
if (e.eat(91)) {
|
|
2767
2767
|
var t = e.eat(94), n = this.regexp_classContents(e);
|
|
2768
|
-
return e.eat(93) || e.raise("Unterminated character class"), t && n ===
|
|
2768
|
+
return e.eat(93) || e.raise("Unterminated character class"), t && n === R && e.raise("Negated character class may contain strings"), !0;
|
|
2769
2769
|
}
|
|
2770
2770
|
return !1;
|
|
2771
2771
|
}, L.regexp_classContents = function(e) {
|
|
2772
|
-
return e.current() === 93 ?
|
|
2772
|
+
return e.current() === 93 ? zt : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), zt);
|
|
2773
2773
|
}, L.regexp_nonEmptyClassRanges = function(e) {
|
|
2774
2774
|
for (; this.regexp_eatClassAtom(e);) {
|
|
2775
2775
|
var t = e.lastIntValue;
|
|
@@ -2784,7 +2784,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2784
2784
|
if (this.regexp_eatClassEscape(e)) return !0;
|
|
2785
2785
|
if (e.switchU) {
|
|
2786
2786
|
var n = e.current();
|
|
2787
|
-
(n === 99 ||
|
|
2787
|
+
(n === 99 || Yt(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2788
2788
|
}
|
|
2789
2789
|
e.pos = t;
|
|
2790
2790
|
}
|
|
@@ -2800,13 +2800,13 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2800
2800
|
}
|
|
2801
2801
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2802
2802
|
}, L.regexp_classSetExpression = function(e) {
|
|
2803
|
-
var t =
|
|
2803
|
+
var t = zt, n;
|
|
2804
2804
|
if (!this.regexp_eatClassSetRange(e)) {
|
|
2805
2805
|
if (n = this.regexp_eatClassSetOperand(e)) {
|
|
2806
|
-
n ===
|
|
2806
|
+
n === R && (t = R);
|
|
2807
2807
|
for (var r = e.pos; e.eatChars([38, 38]);) {
|
|
2808
2808
|
if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
|
|
2809
|
-
n !==
|
|
2809
|
+
n !== R && (t = zt);
|
|
2810
2810
|
continue;
|
|
2811
2811
|
}
|
|
2812
2812
|
e.raise("Invalid character in character class");
|
|
@@ -2818,7 +2818,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2818
2818
|
}
|
|
2819
2819
|
for (;;) if (!this.regexp_eatClassSetRange(e)) {
|
|
2820
2820
|
if (n = this.regexp_eatClassSetOperand(e), !n) return t;
|
|
2821
|
-
n ===
|
|
2821
|
+
n === R && (t = R);
|
|
2822
2822
|
}
|
|
2823
2823
|
}, L.regexp_eatClassSetRange = function(e) {
|
|
2824
2824
|
var t = e.pos;
|
|
@@ -2832,12 +2832,12 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2832
2832
|
}
|
|
2833
2833
|
return !1;
|
|
2834
2834
|
}, L.regexp_eatClassSetOperand = function(e) {
|
|
2835
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2835
|
+
return this.regexp_eatClassSetCharacter(e) ? zt : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2836
2836
|
}, L.regexp_eatNestedClass = function(e) {
|
|
2837
2837
|
var t = e.pos;
|
|
2838
2838
|
if (e.eat(91)) {
|
|
2839
2839
|
var n = e.eat(94), r = this.regexp_classContents(e);
|
|
2840
|
-
if (e.eat(93)) return n && r ===
|
|
2840
|
+
if (e.eat(93)) return n && r === R && e.raise("Negated character class may contain strings"), r;
|
|
2841
2841
|
e.pos = t;
|
|
2842
2842
|
}
|
|
2843
2843
|
if (e.eat(92)) {
|
|
@@ -2857,33 +2857,33 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2857
2857
|
}
|
|
2858
2858
|
return null;
|
|
2859
2859
|
}, L.regexp_classStringDisjunctionContents = function(e) {
|
|
2860
|
-
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) ===
|
|
2860
|
+
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === R && (t = R);
|
|
2861
2861
|
return t;
|
|
2862
2862
|
}, L.regexp_classString = function(e) {
|
|
2863
2863
|
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
2864
|
-
return t === 1 ?
|
|
2864
|
+
return t === 1 ? zt : R;
|
|
2865
2865
|
}, L.regexp_eatClassSetCharacter = function(e) {
|
|
2866
2866
|
var t = e.pos;
|
|
2867
2867
|
if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2868
2868
|
var n = e.current();
|
|
2869
|
-
return n < 0 || n === e.lookahead() &&
|
|
2869
|
+
return n < 0 || n === e.lookahead() && Ut(n) || Wt(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
|
|
2870
2870
|
};
|
|
2871
|
-
function
|
|
2871
|
+
function Ut(e) {
|
|
2872
2872
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function Wt(e) {
|
|
2875
2875
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2876
2876
|
}
|
|
2877
2877
|
L.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2878
2878
|
var t = e.current();
|
|
2879
|
-
return
|
|
2879
|
+
return Gt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2880
2880
|
};
|
|
2881
|
-
function
|
|
2881
|
+
function Gt(e) {
|
|
2882
2882
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2883
2883
|
}
|
|
2884
2884
|
L.regexp_eatClassControlLetter = function(e) {
|
|
2885
2885
|
var t = e.current();
|
|
2886
|
-
return
|
|
2886
|
+
return Kt(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2887
2887
|
}, L.regexp_eatHexEscapeSequence = function(e) {
|
|
2888
2888
|
var t = e.pos;
|
|
2889
2889
|
if (e.eat(120)) {
|
|
@@ -2893,21 +2893,21 @@ L.regexp_eatClassControlLetter = function(e) {
|
|
|
2893
2893
|
return !1;
|
|
2894
2894
|
}, L.regexp_eatDecimalDigits = function(e) {
|
|
2895
2895
|
var t = e.pos, n = 0;
|
|
2896
|
-
for (e.lastIntValue = 0;
|
|
2896
|
+
for (e.lastIntValue = 0; Kt(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
|
|
2897
2897
|
return e.pos !== t;
|
|
2898
2898
|
};
|
|
2899
|
-
function
|
|
2899
|
+
function Kt(e) {
|
|
2900
2900
|
return e >= 48 && e <= 57;
|
|
2901
2901
|
}
|
|
2902
2902
|
L.regexp_eatHexDigits = function(e) {
|
|
2903
2903
|
var t = e.pos, n = 0;
|
|
2904
|
-
for (e.lastIntValue = 0;
|
|
2904
|
+
for (e.lastIntValue = 0; qt(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + Jt(n), e.advance();
|
|
2905
2905
|
return e.pos !== t;
|
|
2906
2906
|
};
|
|
2907
|
-
function
|
|
2907
|
+
function qt(e) {
|
|
2908
2908
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2909
2909
|
}
|
|
2910
|
-
function
|
|
2910
|
+
function Jt(e) {
|
|
2911
2911
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2912
2912
|
}
|
|
2913
2913
|
L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -2922,9 +2922,9 @@ L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2922
2922
|
return !1;
|
|
2923
2923
|
}, L.regexp_eatOctalDigit = function(e) {
|
|
2924
2924
|
var t = e.current();
|
|
2925
|
-
return
|
|
2925
|
+
return Yt(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2926
2926
|
};
|
|
2927
|
-
function
|
|
2927
|
+
function Yt(e) {
|
|
2928
2928
|
return e >= 48 && e <= 55;
|
|
2929
2929
|
}
|
|
2930
2930
|
L.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -2932,19 +2932,19 @@ L.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
2932
2932
|
e.lastIntValue = 0;
|
|
2933
2933
|
for (var r = 0; r < t; ++r) {
|
|
2934
2934
|
var i = e.current();
|
|
2935
|
-
if (!
|
|
2936
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2935
|
+
if (!qt(i)) return e.pos = n, !1;
|
|
2936
|
+
e.lastIntValue = 16 * e.lastIntValue + Jt(i), e.advance();
|
|
2937
2937
|
}
|
|
2938
2938
|
return !0;
|
|
2939
2939
|
};
|
|
2940
|
-
var
|
|
2940
|
+
var Xt = function(e) {
|
|
2941
2941
|
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new ve(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2942
|
-
},
|
|
2943
|
-
|
|
2944
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2945
|
-
},
|
|
2946
|
-
return this.next(), new
|
|
2947
|
-
}, typeof Symbol < "u" && (
|
|
2942
|
+
}, z = k.prototype;
|
|
2943
|
+
z.next = function(e) {
|
|
2944
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Xt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2945
|
+
}, z.getToken = function() {
|
|
2946
|
+
return this.next(), new Xt(this);
|
|
2947
|
+
}, typeof Symbol < "u" && (z[Symbol.iterator] = function() {
|
|
2948
2948
|
var e = this;
|
|
2949
2949
|
return { next: function() {
|
|
2950
2950
|
var t = e.getToken();
|
|
@@ -2953,28 +2953,28 @@ B.next = function(e) {
|
|
|
2953
2953
|
value: t
|
|
2954
2954
|
};
|
|
2955
2955
|
} };
|
|
2956
|
-
}),
|
|
2956
|
+
}), z.nextToken = function() {
|
|
2957
2957
|
var e = this.curContext();
|
|
2958
2958
|
if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(E.eof);
|
|
2959
2959
|
if (e.override) return e.override(this);
|
|
2960
2960
|
this.readToken(this.fullCharCodeAtPos());
|
|
2961
|
-
},
|
|
2961
|
+
}, z.readToken = function(e) {
|
|
2962
2962
|
return y(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
2963
|
-
},
|
|
2963
|
+
}, z.fullCharCodeAt = function(e) {
|
|
2964
2964
|
var t = this.input.charCodeAt(e);
|
|
2965
2965
|
if (t <= 55295 || t >= 56320) return t;
|
|
2966
2966
|
var n = this.input.charCodeAt(e + 1);
|
|
2967
2967
|
return n <= 56319 || n >= 57344 ? t : (t << 10) + n - 56613888;
|
|
2968
|
-
},
|
|
2968
|
+
}, z.fullCharCodeAtPos = function() {
|
|
2969
2969
|
return this.fullCharCodeAt(this.pos);
|
|
2970
|
-
},
|
|
2970
|
+
}, z.skipBlockComment = function() {
|
|
2971
2971
|
var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
2972
2972
|
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r = oe(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
|
|
2973
2973
|
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
2974
|
-
},
|
|
2974
|
+
}, z.skipLineComment = function(e) {
|
|
2975
2975
|
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !ae(r);) r = this.input.charCodeAt(++this.pos);
|
|
2976
2976
|
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
|
|
2977
|
-
},
|
|
2977
|
+
}, z.skipSpace = function() {
|
|
2978
2978
|
loop: for (; this.pos < this.input.length;) {
|
|
2979
2979
|
var e = this.input.charCodeAt(this.pos);
|
|
2980
2980
|
switch (e) {
|
|
@@ -3003,36 +3003,36 @@ B.next = function(e) {
|
|
|
3003
3003
|
else break loop;
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
|
-
},
|
|
3006
|
+
}, z.finishToken = function(e, t) {
|
|
3007
3007
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
3008
3008
|
var n = this.type;
|
|
3009
3009
|
this.type = e, this.value = t, this.updateContext(n);
|
|
3010
|
-
},
|
|
3010
|
+
}, z.readToken_dot = function() {
|
|
3011
3011
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3012
3012
|
if (e >= 48 && e <= 57) return this.readNumber(!0);
|
|
3013
3013
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
3014
3014
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(E.ellipsis)) : (++this.pos, this.finishToken(E.dot));
|
|
3015
|
-
},
|
|
3015
|
+
}, z.readToken_slash = function() {
|
|
3016
3016
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3017
3017
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(E.assign, 2) : this.finishOp(E.slash, 1);
|
|
3018
|
-
},
|
|
3018
|
+
}, z.readToken_mult_modulo_exp = function(e) {
|
|
3019
3019
|
var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ? E.star : E.modulo;
|
|
3020
3020
|
return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++n, r = E.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(E.assign, n + 1) : this.finishOp(r, n);
|
|
3021
|
-
},
|
|
3021
|
+
}, z.readToken_pipe_amp = function(e) {
|
|
3022
3022
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3023
3023
|
return t === e ? this.options.ecmaVersion >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(E.assign, 3) : this.finishOp(e === 124 ? E.logicalOR : E.logicalAND, 2) : t === 61 ? this.finishOp(E.assign, 2) : this.finishOp(e === 124 ? E.bitwiseOR : E.bitwiseAND, 1);
|
|
3024
|
-
},
|
|
3024
|
+
}, z.readToken_caret = function() {
|
|
3025
3025
|
return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(E.assign, 2) : this.finishOp(E.bitwiseXOR, 1);
|
|
3026
|
-
},
|
|
3026
|
+
}, z.readToken_plus_min = function(e) {
|
|
3027
3027
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3028
3028
|
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || D.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(E.incDec, 2) : t === 61 ? this.finishOp(E.assign, 2) : this.finishOp(E.plusMin, 1);
|
|
3029
|
-
},
|
|
3029
|
+
}, z.readToken_lt_gt = function(e) {
|
|
3030
3030
|
var t = this.input.charCodeAt(this.pos + 1), n = 1;
|
|
3031
3031
|
return t === e ? (n = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + n) === 61 ? this.finishOp(E.assign, n + 1) : this.finishOp(E.bitShift, n)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (n = 2), this.finishOp(E.relational, n));
|
|
3032
|
-
},
|
|
3032
|
+
}, z.readToken_eq_excl = function(e) {
|
|
3033
3033
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3034
3034
|
return t === 61 ? this.finishOp(E.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(E.arrow)) : this.finishOp(e === 61 ? E.eq : E.prefix, 1);
|
|
3035
|
-
},
|
|
3035
|
+
}, z.readToken_question = function() {
|
|
3036
3036
|
var e = this.options.ecmaVersion;
|
|
3037
3037
|
if (e >= 11) {
|
|
3038
3038
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -3043,11 +3043,11 @@ B.next = function(e) {
|
|
|
3043
3043
|
if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(E.assign, 3) : this.finishOp(E.coalesce, 2);
|
|
3044
3044
|
}
|
|
3045
3045
|
return this.finishOp(E.question, 1);
|
|
3046
|
-
},
|
|
3046
|
+
}, z.readToken_numberSign = function() {
|
|
3047
3047
|
var e = this.options.ecmaVersion, t = 35;
|
|
3048
3048
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), y(t, !0) || t === 92)) return this.finishToken(E.privateId, this.readWord1());
|
|
3049
3049
|
this.raise(this.pos, "Unexpected character '" + he(t) + "'");
|
|
3050
|
-
},
|
|
3050
|
+
}, z.getTokenFromCode = function(e) {
|
|
3051
3051
|
switch (e) {
|
|
3052
3052
|
case 46: return this.readToken_dot();
|
|
3053
3053
|
case 40: return ++this.pos, this.finishToken(E.parenL);
|
|
@@ -3097,10 +3097,10 @@ B.next = function(e) {
|
|
|
3097
3097
|
case 35: return this.readToken_numberSign();
|
|
3098
3098
|
}
|
|
3099
3099
|
this.raise(this.pos, "Unexpected character '" + he(e) + "'");
|
|
3100
|
-
},
|
|
3100
|
+
}, z.finishOp = function(e, t) {
|
|
3101
3101
|
var n = this.input.slice(this.pos, this.pos + t);
|
|
3102
3102
|
return this.pos += t, this.finishToken(e, n);
|
|
3103
|
-
},
|
|
3103
|
+
}, z.readRegexp = function() {
|
|
3104
3104
|
for (var e, t, n = this.pos;;) {
|
|
3105
3105
|
this.pos >= this.input.length && this.raise(n, "Unterminated regular expression");
|
|
3106
3106
|
var r = this.input.charAt(this.pos);
|
|
@@ -3117,7 +3117,7 @@ B.next = function(e) {
|
|
|
3117
3117
|
++this.pos;
|
|
3118
3118
|
var a = this.pos, o = this.readWord1();
|
|
3119
3119
|
this.containsEsc && this.unexpected(a);
|
|
3120
|
-
var s = this.regexpState ||= new
|
|
3120
|
+
var s = this.regexpState ||= new At(this);
|
|
3121
3121
|
s.reset(n, i, o), this.validateRegExpFlags(s), this.validateRegExpPattern(s);
|
|
3122
3122
|
var c = null;
|
|
3123
3123
|
try {
|
|
@@ -3128,7 +3128,7 @@ B.next = function(e) {
|
|
|
3128
3128
|
flags: o,
|
|
3129
3129
|
value: c
|
|
3130
3130
|
});
|
|
3131
|
-
},
|
|
3131
|
+
}, z.readInt = function(e, t, n) {
|
|
3132
3132
|
for (var r = this.options.ecmaVersion >= 12 && t === void 0, i = n && this.input.charCodeAt(this.pos) === 48, a = this.pos, o = 0, s = 0, c = 0, l = t ?? Infinity; c < l; ++c, ++this.pos) {
|
|
3133
3133
|
var u = this.input.charCodeAt(this.pos), d = void 0;
|
|
3134
3134
|
if (r && u === 95) {
|
|
@@ -3140,31 +3140,31 @@ B.next = function(e) {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
return r && s === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === a || t != null && this.pos - a !== t ? null : o;
|
|
3142
3142
|
};
|
|
3143
|
-
function
|
|
3143
|
+
function Zt(e, t) {
|
|
3144
3144
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Qt(e) {
|
|
3147
3147
|
return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
|
|
3148
3148
|
}
|
|
3149
|
-
|
|
3149
|
+
z.readRadixNumber = function(e) {
|
|
3150
3150
|
var t = this.pos;
|
|
3151
3151
|
this.pos += 2;
|
|
3152
3152
|
var n = this.readInt(e);
|
|
3153
|
-
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n =
|
|
3154
|
-
},
|
|
3153
|
+
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = Qt(this.input.slice(t, this.pos)), ++this.pos) : y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(E.num, n);
|
|
3154
|
+
}, z.readNumber = function(e) {
|
|
3155
3155
|
var t = this.pos;
|
|
3156
3156
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
3157
3157
|
var n = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
3158
3158
|
n && this.strict && this.raise(t, "Invalid number");
|
|
3159
3159
|
var r = this.input.charCodeAt(this.pos);
|
|
3160
3160
|
if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3161
|
-
var i =
|
|
3161
|
+
var i = Qt(this.input.slice(t, this.pos));
|
|
3162
3162
|
return ++this.pos, y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(E.num, i);
|
|
3163
3163
|
}
|
|
3164
3164
|
n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3165
|
-
var a =
|
|
3165
|
+
var a = Zt(this.input.slice(t, this.pos), n);
|
|
3166
3166
|
return this.finishToken(E.num, a);
|
|
3167
|
-
},
|
|
3167
|
+
}, z.readCodePoint = function() {
|
|
3168
3168
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3169
3169
|
if (e === 123) {
|
|
3170
3170
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -3172,7 +3172,7 @@ B.readRadixNumber = function(e) {
|
|
|
3172
3172
|
t = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, t > 1114111 && this.invalidStringToken(n, "Code point out of bounds");
|
|
3173
3173
|
} else t = this.readHexChar(4);
|
|
3174
3174
|
return t;
|
|
3175
|
-
},
|
|
3175
|
+
}, z.readString = function(e) {
|
|
3176
3176
|
for (var t = "", n = ++this.pos;;) {
|
|
3177
3177
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3178
3178
|
var r = this.input.charCodeAt(this.pos);
|
|
@@ -3181,20 +3181,20 @@ B.readRadixNumber = function(e) {
|
|
|
3181
3181
|
}
|
|
3182
3182
|
return t += this.input.slice(n, this.pos++), this.finishToken(E.string, t);
|
|
3183
3183
|
};
|
|
3184
|
-
var
|
|
3185
|
-
|
|
3184
|
+
var $t = {};
|
|
3185
|
+
z.tryReadTemplateToken = function() {
|
|
3186
3186
|
this.inTemplateElement = !0;
|
|
3187
3187
|
try {
|
|
3188
3188
|
this.readTmplToken();
|
|
3189
3189
|
} catch (e) {
|
|
3190
|
-
if (e ===
|
|
3190
|
+
if (e === $t) this.readInvalidTemplateToken();
|
|
3191
3191
|
else throw e;
|
|
3192
3192
|
}
|
|
3193
3193
|
this.inTemplateElement = !1;
|
|
3194
|
-
},
|
|
3195
|
-
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw
|
|
3194
|
+
}, z.invalidStringToken = function(e, t) {
|
|
3195
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw $t;
|
|
3196
3196
|
this.raise(e, t);
|
|
3197
|
-
},
|
|
3197
|
+
}, z.readTmplToken = function() {
|
|
3198
3198
|
for (var e = "", t = this.pos;;) {
|
|
3199
3199
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3200
3200
|
var n = this.input.charCodeAt(this.pos);
|
|
@@ -3211,7 +3211,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3211
3211
|
this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos;
|
|
3212
3212
|
} else ++this.pos;
|
|
3213
3213
|
}
|
|
3214
|
-
},
|
|
3214
|
+
}, z.readInvalidTemplateToken = function() {
|
|
3215
3215
|
for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
|
|
3216
3216
|
case "\\":
|
|
3217
3217
|
++this.pos;
|
|
@@ -3224,7 +3224,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3224
3224
|
case "\u2029": ++this.curLine, this.lineStart = this.pos + 1;
|
|
3225
3225
|
}
|
|
3226
3226
|
this.raise(this.start, "Unterminated template");
|
|
3227
|
-
},
|
|
3227
|
+
}, z.readEscapedChar = function(e) {
|
|
3228
3228
|
var t = this.input.charCodeAt(++this.pos);
|
|
3229
3229
|
switch (++this.pos, t) {
|
|
3230
3230
|
case 110: return "\n";
|
|
@@ -3249,10 +3249,10 @@ B.tryReadTemplateToken = function() {
|
|
|
3249
3249
|
}
|
|
3250
3250
|
return ae(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3251
3251
|
}
|
|
3252
|
-
},
|
|
3252
|
+
}, z.readHexChar = function(e) {
|
|
3253
3253
|
var t = this.pos, n = this.readInt(16, e);
|
|
3254
3254
|
return n === null && this.invalidStringToken(t, "Bad character escape sequence"), n;
|
|
3255
|
-
},
|
|
3255
|
+
}, z.readWord1 = function() {
|
|
3256
3256
|
this.containsEsc = !1;
|
|
3257
3257
|
for (var e = "", t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3258
3258
|
var i = this.fullCharCodeAtPos();
|
|
@@ -3267,14 +3267,14 @@ B.tryReadTemplateToken = function() {
|
|
|
3267
3267
|
t = !1;
|
|
3268
3268
|
}
|
|
3269
3269
|
return e + this.input.slice(n, this.pos);
|
|
3270
|
-
},
|
|
3270
|
+
}, z.readWord = function() {
|
|
3271
3271
|
var e = this.readWord1(), t = E.name;
|
|
3272
3272
|
return this.keywords.test(e) && (t = re[e]), this.finishToken(t, e);
|
|
3273
3273
|
};
|
|
3274
|
-
var
|
|
3274
|
+
var en = "8.18.0";
|
|
3275
3275
|
k.acorn = {
|
|
3276
3276
|
Parser: k,
|
|
3277
|
-
version:
|
|
3277
|
+
version: en,
|
|
3278
3278
|
defaultOptions: be,
|
|
3279
3279
|
Position: _e,
|
|
3280
3280
|
SourceLocation: ve,
|
|
@@ -3287,24 +3287,24 @@ k.acorn = {
|
|
|
3287
3287
|
tokContexts: F,
|
|
3288
3288
|
isIdentifierChar: b,
|
|
3289
3289
|
isIdentifierStart: y,
|
|
3290
|
-
Token:
|
|
3290
|
+
Token: Xt,
|
|
3291
3291
|
isNewLine: ae,
|
|
3292
3292
|
lineBreak: D,
|
|
3293
3293
|
lineBreakG: ie,
|
|
3294
3294
|
nonASCIIwhitespace: se
|
|
3295
3295
|
};
|
|
3296
|
-
function
|
|
3296
|
+
function tn(e, t) {
|
|
3297
3297
|
return k.parse(e, t);
|
|
3298
3298
|
}
|
|
3299
|
-
function
|
|
3299
|
+
function nn(e, t, n) {
|
|
3300
3300
|
return k.parseExpressionAt(e, t, n);
|
|
3301
3301
|
}
|
|
3302
|
-
function
|
|
3302
|
+
function rn(e, t) {
|
|
3303
3303
|
return k.tokenizer(e, t);
|
|
3304
3304
|
}
|
|
3305
3305
|
//#endregion
|
|
3306
3306
|
//#region node_modules/acorn-typescript/lib/index.mjs
|
|
3307
|
-
function
|
|
3307
|
+
function an(e, t) {
|
|
3308
3308
|
for (var n = 0; n < t.length; n++) {
|
|
3309
3309
|
var r = t[n];
|
|
3310
3310
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (i = function(e, t) {
|
|
@@ -3320,36 +3320,36 @@ function rn(e, t) {
|
|
|
3320
3320
|
}
|
|
3321
3321
|
var i;
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3324
|
-
return
|
|
3323
|
+
function on() {
|
|
3324
|
+
return on = Object.assign ? Object.assign.bind() : function(e) {
|
|
3325
3325
|
for (var t = 1; t < arguments.length; t++) {
|
|
3326
3326
|
var n = arguments[t];
|
|
3327
3327
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3328
3328
|
}
|
|
3329
3329
|
return e;
|
|
3330
|
-
},
|
|
3331
|
-
}
|
|
3332
|
-
function on(e, t) {
|
|
3333
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t);
|
|
3330
|
+
}, on.apply(this, arguments);
|
|
3334
3331
|
}
|
|
3335
3332
|
function sn(e, t) {
|
|
3336
|
-
|
|
3337
|
-
return e.__proto__ = t, e;
|
|
3338
|
-
}, sn(e, t);
|
|
3333
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, cn(e, t);
|
|
3339
3334
|
}
|
|
3340
3335
|
function cn(e, t) {
|
|
3336
|
+
return cn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
3337
|
+
return e.__proto__ = t, e;
|
|
3338
|
+
}, cn(e, t);
|
|
3339
|
+
}
|
|
3340
|
+
function ln(e, t) {
|
|
3341
3341
|
(t == null || t > e.length) && (t = e.length);
|
|
3342
3342
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
3343
3343
|
return r;
|
|
3344
3344
|
}
|
|
3345
|
-
function
|
|
3345
|
+
function un(e, t) {
|
|
3346
3346
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3347
3347
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
3348
3348
|
if (Array.isArray(e) || (n = function(e, t) {
|
|
3349
3349
|
if (e) {
|
|
3350
|
-
if (typeof e == "string") return
|
|
3350
|
+
if (typeof e == "string") return ln(e, t);
|
|
3351
3351
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3352
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
3352
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ln(e, t) : void 0;
|
|
3353
3353
|
}
|
|
3354
3354
|
}(e)) || t && e && typeof e.length == "number") {
|
|
3355
3355
|
n && (e = n);
|
|
@@ -3363,28 +3363,28 @@ function ln(e, t) {
|
|
|
3363
3363
|
}
|
|
3364
3364
|
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3365
3365
|
}
|
|
3366
|
-
var
|
|
3367
|
-
function
|
|
3366
|
+
var B = !0;
|
|
3367
|
+
function V(e, t) {
|
|
3368
3368
|
return t === void 0 && (t = {}), new x("name", t);
|
|
3369
3369
|
}
|
|
3370
|
-
var
|
|
3371
|
-
function
|
|
3372
|
-
var t =
|
|
3370
|
+
var dn = /* @__PURE__ */ new WeakMap();
|
|
3371
|
+
function fn(e) {
|
|
3372
|
+
var t = dn.get(e.Parser.acorn || e);
|
|
3373
3373
|
if (!t) {
|
|
3374
3374
|
var n = {
|
|
3375
|
-
assert:
|
|
3376
|
-
asserts:
|
|
3377
|
-
global:
|
|
3378
|
-
keyof:
|
|
3379
|
-
readonly:
|
|
3380
|
-
unique:
|
|
3381
|
-
abstract:
|
|
3382
|
-
declare:
|
|
3383
|
-
enum:
|
|
3384
|
-
module:
|
|
3385
|
-
namespace:
|
|
3386
|
-
interface:
|
|
3387
|
-
type:
|
|
3375
|
+
assert: V(0, { startsExpr: B }),
|
|
3376
|
+
asserts: V(0, { startsExpr: B }),
|
|
3377
|
+
global: V(0, { startsExpr: B }),
|
|
3378
|
+
keyof: V(0, { startsExpr: B }),
|
|
3379
|
+
readonly: V(0, { startsExpr: B }),
|
|
3380
|
+
unique: V(0, { startsExpr: B }),
|
|
3381
|
+
abstract: V(0, { startsExpr: B }),
|
|
3382
|
+
declare: V(0, { startsExpr: B }),
|
|
3383
|
+
enum: V(0, { startsExpr: B }),
|
|
3384
|
+
module: V(0, { startsExpr: B }),
|
|
3385
|
+
namespace: V(0, { startsExpr: B }),
|
|
3386
|
+
interface: V(0, { startsExpr: B }),
|
|
3387
|
+
type: V(0, { startsExpr: B })
|
|
3388
3388
|
}, r = {
|
|
3389
3389
|
at: new x("@"),
|
|
3390
3390
|
jsxName: new x("jsxName"),
|
|
@@ -3402,8 +3402,8 @@ function dn(e) {
|
|
|
3402
3402
|
var t = this.context.pop();
|
|
3403
3403
|
t === i.tc_oTag && e === E.slash || t === i.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === i.tc_expr) : this.exprAllowed = !0;
|
|
3404
3404
|
}, t = {
|
|
3405
|
-
tokTypes:
|
|
3406
|
-
tokContexts:
|
|
3405
|
+
tokTypes: on({}, n, r),
|
|
3406
|
+
tokContexts: on({}, i),
|
|
3407
3407
|
keywordsRegExp: a,
|
|
3408
3408
|
tokenIsLiteralPropertyName: function(e) {
|
|
3409
3409
|
return [
|
|
@@ -3443,18 +3443,18 @@ function dn(e) {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
return t;
|
|
3445
3445
|
}
|
|
3446
|
-
var
|
|
3446
|
+
var pn = 1024, mn = RegExp("(?=(" + (/* @__PURE__ */ RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y")).source + "))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)", "y"), hn = function() {
|
|
3447
3447
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3448
3448
|
};
|
|
3449
|
-
function
|
|
3449
|
+
function gn(e, t) {
|
|
3450
3450
|
var n = t.key.name, r = e[n], i = "true";
|
|
3451
3451
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : !!r || (e[n] = i, !1);
|
|
3452
3452
|
}
|
|
3453
|
-
function
|
|
3453
|
+
function _n(e, t) {
|
|
3454
3454
|
var n = e.key;
|
|
3455
3455
|
return !e.computed && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
3456
3456
|
}
|
|
3457
|
-
var
|
|
3457
|
+
var H = {
|
|
3458
3458
|
AbstractMethodHasImplementation: function(e) {
|
|
3459
3459
|
return "Method '" + e.methodName + "' cannot have an implementation because it is marked abstract.";
|
|
3460
3460
|
},
|
|
@@ -3555,7 +3555,7 @@ var U = {
|
|
|
3555
3555
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
3556
3556
|
},
|
|
3557
3557
|
LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."
|
|
3558
|
-
},
|
|
3558
|
+
}, vn = {
|
|
3559
3559
|
quot: "\"",
|
|
3560
3560
|
amp: "&",
|
|
3561
3561
|
apos: "'",
|
|
@@ -3809,38 +3809,38 @@ var U = {
|
|
|
3809
3809
|
clubs: "♣",
|
|
3810
3810
|
hearts: "♥",
|
|
3811
3811
|
diams: "♦"
|
|
3812
|
-
},
|
|
3813
|
-
function
|
|
3814
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
3812
|
+
}, yn = /^[\da-fA-F]+$/, bn = /^\d+$/;
|
|
3813
|
+
function xn(e) {
|
|
3814
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? xn(e.object) + "." + xn(e.property) : void 0);
|
|
3815
3815
|
}
|
|
3816
|
-
var
|
|
3817
|
-
function
|
|
3816
|
+
var Sn = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3817
|
+
function Cn(e) {
|
|
3818
3818
|
if (!e) throw Error("Assert fail");
|
|
3819
3819
|
}
|
|
3820
|
-
function
|
|
3820
|
+
function wn(e) {
|
|
3821
3821
|
return e === "accessor";
|
|
3822
3822
|
}
|
|
3823
|
-
function
|
|
3823
|
+
function Tn(e) {
|
|
3824
3824
|
return e === "in" || e === "out";
|
|
3825
3825
|
}
|
|
3826
|
-
function
|
|
3826
|
+
function En(e, t) {
|
|
3827
3827
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
3828
3828
|
}
|
|
3829
|
-
function
|
|
3829
|
+
function Dn(e) {
|
|
3830
3830
|
if (e.type !== "MemberExpression") return !1;
|
|
3831
3831
|
var t = e.property;
|
|
3832
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
3833
|
-
}
|
|
3834
|
-
function Dn(e) {
|
|
3835
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && Dn(e.object);
|
|
3832
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && On(e.object);
|
|
3836
3833
|
}
|
|
3837
3834
|
function On(e) {
|
|
3838
|
-
return e === "
|
|
3835
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && On(e.object);
|
|
3839
3836
|
}
|
|
3840
3837
|
function kn(e) {
|
|
3838
|
+
return e === "private" || e === "public" || e === "protected";
|
|
3839
|
+
}
|
|
3840
|
+
function An(e) {
|
|
3841
3841
|
var t = e || {}, n = t.dts, r = n !== void 0 && n, i = t.allowSatisfies, a = i !== void 0 && i;
|
|
3842
3842
|
return function(t) {
|
|
3843
|
-
var n = t.acorn || u, i =
|
|
3843
|
+
var n = t.acorn || u, i = fn(n), o = n.tokTypes, s = n.keywordTypes, c = n.isIdentifierStart, l = n.lineBreak, d = n.isNewLine, f = n.tokContexts, p = n.isIdentifierChar, m = i.tokTypes, h = i.tokContexts, g = i.keywordsRegExp, _ = i.tokenIsLiteralPropertyName, ee = i.tokenIsTemplate, te = i.tokenIsTSDeclarationStart, v = i.tokenIsIdentifier, ne = i.tokenIsKeywordOrIdentifier, y = i.tokenIsTSTypeOperator;
|
|
3844
3844
|
function b(e, t, n) {
|
|
3845
3845
|
n === void 0 && (n = e.length);
|
|
3846
3846
|
for (var r = t; r < n; r++) {
|
|
@@ -3855,7 +3855,7 @@ function kn(e) {
|
|
|
3855
3855
|
function t() {
|
|
3856
3856
|
return e.apply(this, arguments) || this;
|
|
3857
3857
|
}
|
|
3858
|
-
|
|
3858
|
+
sn(t, e);
|
|
3859
3859
|
var n = t.prototype;
|
|
3860
3860
|
return n.takeDecorators = function(e) {
|
|
3861
3861
|
var t = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3898,7 +3898,7 @@ function kn(e) {
|
|
|
3898
3898
|
function t() {
|
|
3899
3899
|
return e.apply(this, arguments) || this;
|
|
3900
3900
|
}
|
|
3901
|
-
|
|
3901
|
+
sn(t, e);
|
|
3902
3902
|
var n = t.prototype;
|
|
3903
3903
|
return n.jsx_readToken = function() {
|
|
3904
3904
|
for (var e = "", t = this.pos;;) {
|
|
@@ -3931,7 +3931,7 @@ function kn(e) {
|
|
|
3931
3931
|
r !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
3932
3932
|
for (var i = ++this.pos; this.pos < this.input.length && n++ < 10;) {
|
|
3933
3933
|
if ((r = this.input[this.pos++]) === ";") {
|
|
3934
|
-
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2),
|
|
3934
|
+
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2), yn.test(t) && (e = String.fromCharCode(parseInt(t, 16)))) : (t = t.substr(1), bn.test(t) && (e = String.fromCharCode(parseInt(t, 10)))) : e = vn[t];
|
|
3935
3935
|
break;
|
|
3936
3936
|
}
|
|
3937
3937
|
t += r;
|
|
@@ -4005,7 +4005,7 @@ function kn(e) {
|
|
|
4005
4005
|
break;
|
|
4006
4006
|
default: this.unexpected();
|
|
4007
4007
|
}
|
|
4008
|
-
|
|
4008
|
+
xn(s.name) !== xn(o.name) && this.raise(s.start, "Expected corresponding JSX closing tag for <" + xn(o.name) + ">");
|
|
4009
4009
|
}
|
|
4010
4010
|
var c = o.name ? "Element" : "Fragment";
|
|
4011
4011
|
return n["opening" + c] = o, n["closing" + c] = s, n.children = r, this.type === i.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(n, "JSX" + c);
|
|
@@ -4023,7 +4023,7 @@ function kn(e) {
|
|
|
4023
4023
|
function t() {
|
|
4024
4024
|
return e.apply(this, arguments) || this;
|
|
4025
4025
|
}
|
|
4026
|
-
|
|
4026
|
+
sn(t, e);
|
|
4027
4027
|
var n = t.prototype;
|
|
4028
4028
|
return n.parseMaybeImportAttributes = function(e) {
|
|
4029
4029
|
if (this.type === i._with || this.type === r.assert) {
|
|
@@ -4054,10 +4054,10 @@ function kn(e) {
|
|
|
4054
4054
|
}(i), {
|
|
4055
4055
|
allowedModifiers: ["const"],
|
|
4056
4056
|
disallowedModifiers: ["in", "out"],
|
|
4057
|
-
errorTemplate:
|
|
4057
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
4058
4058
|
}), i;
|
|
4059
4059
|
}
|
|
4060
|
-
|
|
4060
|
+
sn(t, e);
|
|
4061
4061
|
var u, x, S, C = t.prototype;
|
|
4062
4062
|
return C.getTokenFromCodeInType = function(t) {
|
|
4063
4063
|
return t === 62 || t === 60 ? this.finishOp(o.relational, 1) : e.prototype.getTokenFromCode.call(this, t);
|
|
@@ -4125,14 +4125,14 @@ function kn(e) {
|
|
|
4125
4125
|
return this.nextTokenStartSince(this.pos);
|
|
4126
4126
|
}, C.tsHasSomeModifiers = function(e, t) {
|
|
4127
4127
|
return t.some(function(t) {
|
|
4128
|
-
return
|
|
4128
|
+
return kn(t) ? e.accessibility === t : !!e[t];
|
|
4129
4129
|
});
|
|
4130
4130
|
}, C.tsIsStartOfStaticBlocks = function() {
|
|
4131
4131
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
4132
4132
|
}, C.tsCheckForInvalidTypeCasts = function(e) {
|
|
4133
4133
|
var t = this;
|
|
4134
4134
|
e.forEach(function(e) {
|
|
4135
|
-
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start,
|
|
4135
|
+
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start, H.UnexpectedTypeAnnotation);
|
|
4136
4136
|
});
|
|
4137
4137
|
}, C.atPossibleAsyncArrow = function(e) {
|
|
4138
4138
|
return e.type === "Identifier" && e.name === "async" && this.lastTokEndLoc.column === e.end && !this.canInsertSemicolon() && e.end - e.start == 5 && e.start === this.potentialArrowAt;
|
|
@@ -4173,7 +4173,7 @@ function kn(e) {
|
|
|
4173
4173
|
}, C.isAbstractConstructorSignature = function() {
|
|
4174
4174
|
return this.ts_isContextual(m.abstract) && this.lookahead().type === o._new;
|
|
4175
4175
|
}, C.nextTokenStartSince = function(e) {
|
|
4176
|
-
return
|
|
4176
|
+
return Sn.lastIndex = e, Sn.test(this.input) ? Sn.lastIndex : e;
|
|
4177
4177
|
}, C.lookaheadCharCode = function() {
|
|
4178
4178
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4179
4179
|
}, C.compareLookaheadState = function(e, t) {
|
|
@@ -4257,7 +4257,7 @@ function kn(e) {
|
|
|
4257
4257
|
}, C.isLineTerminator = function() {
|
|
4258
4258
|
return this.eat(o.semi) || e.prototype.canInsertSemicolon.call(this);
|
|
4259
4259
|
}, C.hasFollowingLineBreak = function() {
|
|
4260
|
-
return
|
|
4260
|
+
return mn.lastIndex = this.end, mn.test(this.input);
|
|
4261
4261
|
}, C.addExtra = function(e, t, n, r) {
|
|
4262
4262
|
if (r === void 0 && (r = !0), e) {
|
|
4263
4263
|
var i = e.extra = e.extra || {};
|
|
@@ -4349,7 +4349,7 @@ function kn(e) {
|
|
|
4349
4349
|
}
|
|
4350
4350
|
return this.next(), e.prototype.exitScope.call(this), this.finishNode(t, "TSModuleBlock");
|
|
4351
4351
|
}, C.tsParseAmbientExternalModuleDeclaration = function(t) {
|
|
4352
|
-
return this.ts_isContextual(m.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this,
|
|
4352
|
+
return this.ts_isContextual(m.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this, pn), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this)) : e.prototype.semicolon.call(this), this.finishNode(t, "TSModuleDeclaration");
|
|
4353
4353
|
}, C.tsTryParseDeclare = function(e) {
|
|
4354
4354
|
var t = this;
|
|
4355
4355
|
if (!this.isLineTerminator()) {
|
|
@@ -4450,7 +4450,7 @@ function kn(e) {
|
|
|
4450
4450
|
}, C.tsParseBindingListForSignature = function() {
|
|
4451
4451
|
var t = this;
|
|
4452
4452
|
return e.prototype.parseBindingList.call(this, o.parenR, !0, !0).map(function(e) {
|
|
4453
|
-
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start,
|
|
4453
|
+
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start, H.UnsupportedSignatureParameterKind(e.type)), e;
|
|
4454
4454
|
});
|
|
4455
4455
|
}, C.tsParseTypePredicateAsserts = function() {
|
|
4456
4456
|
if (this.type !== m.asserts) return !1;
|
|
@@ -4496,7 +4496,7 @@ function kn(e) {
|
|
|
4496
4496
|
if (this.lookahead().type !== o._const) return null;
|
|
4497
4497
|
this.next();
|
|
4498
4498
|
var e = this.tsParseTypeReference();
|
|
4499
|
-
return e.typeParameters && this.raise(e.typeName.start,
|
|
4499
|
+
return e.typeParameters && this.raise(e.typeName.start, H.CannotFindName({ name: "const" })), e;
|
|
4500
4500
|
}, C.tsParseFunctionOrConstructorType = function(e, t) {
|
|
4501
4501
|
var n = this, r = this.startNode();
|
|
4502
4502
|
return e === "TSConstructorType" && (r.abstract = !!t, t && this.next(), this.next()), this.tsInAllowConditionalTypesContext(function() {
|
|
@@ -4512,7 +4512,7 @@ function kn(e) {
|
|
|
4512
4512
|
switch (e.typeAnnotation.type) {
|
|
4513
4513
|
case "TSTupleType":
|
|
4514
4514
|
case "TSArrayType": return;
|
|
4515
|
-
default: this.raise(e.start,
|
|
4515
|
+
default: this.raise(e.start, H.UnexpectedReadonly);
|
|
4516
4516
|
}
|
|
4517
4517
|
}, C.tsParseTypeOperator = function() {
|
|
4518
4518
|
var e = this.startNode(), t = this.value;
|
|
@@ -4545,7 +4545,7 @@ function kn(e) {
|
|
|
4545
4545
|
}(), this.finishNode(t, "TSLiteralType");
|
|
4546
4546
|
}, C.tsParseImportType = function() {
|
|
4547
4547
|
var e = this.startNode();
|
|
4548
|
-
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start,
|
|
4548
|
+
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start, H.UnsupportedImportTypeArgument), e.argument = this.parseExprAtom(), this.expect(o.parenR), this.eat(o.dot) && (e.qualifier = this.tsParseEntityName()), this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
|
|
4549
4549
|
}, C.tsParseTypeQuery = function() {
|
|
4550
4550
|
var e = this.startNode();
|
|
4551
4551
|
return this.expect(o._typeof), e.exprName = this.match(o._import) ? this.tsParseImportType() : this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeQuery");
|
|
@@ -4562,7 +4562,7 @@ function kn(e) {
|
|
|
4562
4562
|
var e = this.startLoc, t = this.start, n = this.eat(o.ellipsis), r = this.tsParseType(), i = this.eat(o.question);
|
|
4563
4563
|
if (this.eat(o.colon)) {
|
|
4564
4564
|
var a = this.startNodeAtNode(r);
|
|
4565
|
-
a.optional = i, r.type !== "TSTypeReference" || r.typeParameters || r.typeName.type !== "Identifier" ? (this.raise(r.start,
|
|
4565
|
+
a.optional = i, r.type !== "TSTypeReference" || r.typeParameters || r.typeName.type !== "Identifier" ? (this.raise(r.start, H.InvalidTupleMemberLabel), a.label = r) : a.label = r.typeName, a.elementType = this.tsParseType(), r = this.finishNode(a, "TSNamedTupleMember");
|
|
4566
4566
|
} else if (i) {
|
|
4567
4567
|
var s = this.startNodeAtNode(r);
|
|
4568
4568
|
s.typeAnnotation = r, r = this.finishNode(s, "TSOptionalType");
|
|
@@ -4578,11 +4578,11 @@ function kn(e) {
|
|
|
4578
4578
|
var n = !1, r = null;
|
|
4579
4579
|
return t.elementTypes.forEach(function(t) {
|
|
4580
4580
|
var i = t.type;
|
|
4581
|
-
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start,
|
|
4581
|
+
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start, H.OptionalTypeBeforeRequired), n ||= i === "TSNamedTupleMember" && t.optional || i === "TSOptionalType";
|
|
4582
4582
|
var a = i;
|
|
4583
4583
|
i === "TSRestType" && (a = (t = t.typeAnnotation).type);
|
|
4584
4584
|
var o = a === "TSNamedTupleMember";
|
|
4585
|
-
r ??= o, r !== o && e.raise(t.start,
|
|
4585
|
+
r ??= o, r !== o && e.raise(t.start, H.MixedLabeledAndUnlabeledElements);
|
|
4586
4586
|
}), this.finishNode(t, "TSTupleType");
|
|
4587
4587
|
}, C.tsParseTemplateLiteralType = function() {
|
|
4588
4588
|
var e = this.startNode();
|
|
@@ -4665,7 +4665,7 @@ function kn(e) {
|
|
|
4665
4665
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
4666
4666
|
}, C.tsParseType = function() {
|
|
4667
4667
|
var e = this;
|
|
4668
|
-
|
|
4668
|
+
Cn(this.inType);
|
|
4669
4669
|
var t = this.tsParseNonConditionalType();
|
|
4670
4670
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return t;
|
|
4671
4671
|
var n = this.startNodeAtNode(t);
|
|
@@ -4699,7 +4699,7 @@ function kn(e) {
|
|
|
4699
4699
|
modified: e,
|
|
4700
4700
|
allowedModifiers: [],
|
|
4701
4701
|
disallowedModifiers: ["in", "out"],
|
|
4702
|
-
errorTemplate:
|
|
4702
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
4703
4703
|
});
|
|
4704
4704
|
}, C.tsParseTypeParameter = function(e) {
|
|
4705
4705
|
e === void 0 && (e = this.tsParseNoneModifiers.bind(this));
|
|
@@ -4709,7 +4709,7 @@ function kn(e) {
|
|
|
4709
4709
|
var t = this.startNode();
|
|
4710
4710
|
this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart") ? this.next() : this.unexpected();
|
|
4711
4711
|
var n = { value: -1 };
|
|
4712
|
-
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start,
|
|
4712
|
+
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start, H.EmptyTypeParameters), n.value !== -1 && this.addExtra(t, "trailingComma", n.value), this.finishNode(t, "TSTypeParameterDeclaration");
|
|
4713
4713
|
}, C.tsTryParseTypeParameters = function(e) {
|
|
4714
4714
|
if (this.tsMatchLeftRelational()) return this.tsParseTypeParameters(e);
|
|
4715
4715
|
}, C.tsTryParse = function(e) {
|
|
@@ -4733,14 +4733,14 @@ function kn(e) {
|
|
|
4733
4733
|
t[a] = n[a];
|
|
4734
4734
|
}
|
|
4735
4735
|
}, C.tsParseModifiers = function(e) {
|
|
4736
|
-
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ?
|
|
4737
|
-
r === i && n[a] && t.raise(e.column,
|
|
4736
|
+
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ? H.InvalidModifierOnTypeMember : o, c = {}, l = function(e, r, i, a) {
|
|
4737
|
+
r === i && n[a] && t.raise(e.column, H.InvalidModifiersOrder({ orderedModifiers: [i, a] }));
|
|
4738
4738
|
}, u = function(e, r, i, a) {
|
|
4739
|
-
(n[i] && r === a || n[a] && r === i) && t.raise(e.column,
|
|
4739
|
+
(n[i] && r === a || n[a] && r === i) && t.raise(e.column, H.IncompatibleModifiers({ modifiers: [i, a] }));
|
|
4740
4740
|
};;) {
|
|
4741
4741
|
var d = this.startLoc, f = this.tsParseModifier(r.concat(i ?? []), a);
|
|
4742
4742
|
if (!f) break;
|
|
4743
|
-
|
|
4743
|
+
kn(f) ? n.accessibility ? this.raise(this.start, H.DuplicateAccessibilityModifier()) : (l(d, f, f, "override"), l(d, f, f, "static"), l(d, f, f, "readonly"), l(d, f, f, "accessor"), c.accessibility = f, n.accessibility = f) : Tn(f) ? n[f] ? this.raise(this.start, H.DuplicateModifier({ modifier: f })) : (l(d, f, "in", "out"), c[f] = f, n[f] = !0) : wn(f) ? n[f] ? this.raise(this.start, H.DuplicateModifier({ modifier: f })) : (u(d, f, "accessor", "readonly"), u(d, f, "accessor", "static"), u(d, f, "accessor", "override"), c[f] = f, n[f] = !0) : Object.hasOwnProperty.call(n, f) ? this.raise(this.start, H.DuplicateModifier({ modifier: f })) : (l(d, f, "static", "readonly"), l(d, f, "static", "override"), l(d, f, "override", "readonly"), l(d, f, "abstract", "override"), u(d, f, "declare", "override"), u(d, f, "static", "abstract"), c[f] = f, n[f] = !0), i != null && i.includes(f) && this.raise(this.start, s);
|
|
4744
4744
|
}
|
|
4745
4745
|
return c;
|
|
4746
4746
|
}, C.tsParseInOutModifiers = function(e) {
|
|
@@ -4756,7 +4756,7 @@ function kn(e) {
|
|
|
4756
4756
|
"abstract",
|
|
4757
4757
|
"override"
|
|
4758
4758
|
],
|
|
4759
|
-
errorTemplate:
|
|
4759
|
+
errorTemplate: H.InvalidModifierOnTypeParameter
|
|
4760
4760
|
});
|
|
4761
4761
|
}, C.tsParseTypeArguments = function() {
|
|
4762
4762
|
var e = this, t = this.startNode();
|
|
@@ -4764,13 +4764,13 @@ function kn(e) {
|
|
|
4764
4764
|
return e.tsInNoContext(function() {
|
|
4765
4765
|
return e.expect(o.relational), e.tsParseDelimitedList("TypeParametersOrArguments", e.tsParseType.bind(e));
|
|
4766
4766
|
});
|
|
4767
|
-
}), t.params.length === 0 && this.raise(this.start,
|
|
4767
|
+
}), t.params.length === 0 && this.raise(this.start, H.EmptyTypeArguments), this.exprAllowed = !1, this.expect(o.relational), this.finishNode(t, "TSTypeParameterInstantiation");
|
|
4768
4768
|
}, C.tsParseHeritageClause = function(e) {
|
|
4769
4769
|
var t = this, n = this.start, r = this.tsParseDelimitedList("HeritageClauseElement", function() {
|
|
4770
4770
|
var e = t.startNode();
|
|
4771
4771
|
return e.expression = t.tsParseEntityName(), t.tsMatchLeftRelational() && (e.typeParameters = t.tsParseTypeArguments()), t.finishNode(e, "TSExpressionWithTypeArguments");
|
|
4772
4772
|
});
|
|
4773
|
-
return r.length || this.raise(n,
|
|
4773
|
+
return r.length || this.raise(n, H.EmptyHeritageClauseType({ token: e })), r;
|
|
4774
4774
|
}, C.tsParseTypeMemberSemicolon = function() {
|
|
4775
4775
|
this.eat(o.comma) || this.isLineTerminator() || this.expect(o.semi);
|
|
4776
4776
|
}, C.tsTryParseAndCatch = function(e) {
|
|
@@ -4784,18 +4784,18 @@ function kn(e) {
|
|
|
4784
4784
|
this.eat(o.question) && (e.optional = !0);
|
|
4785
4785
|
var n = e;
|
|
4786
4786
|
if (this.match(o.parenL) || this.tsMatchLeftRelational()) {
|
|
4787
|
-
t && this.raise(e.start,
|
|
4787
|
+
t && this.raise(e.start, H.ReadonlyForMethodSignature);
|
|
4788
4788
|
var r = n;
|
|
4789
|
-
r.kind && this.tsMatchLeftRelational() && this.raise(this.start,
|
|
4789
|
+
r.kind && this.tsMatchLeftRelational() && this.raise(this.start, H.AccesorCannotHaveTypeParameters), this.tsFillSignature(o.colon, r), this.tsParseTypeMemberSemicolon();
|
|
4790
4790
|
var i = "parameters", a = "typeAnnotation";
|
|
4791
|
-
if (r.kind === "get") r[i].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(r[i][0]) && this.raise(this.start,
|
|
4791
|
+
if (r.kind === "get") r[i].length > 0 && (this.raise(this.start, "A 'get' accesor must not have any formal parameters."), this.isThisParam(r[i][0]) && this.raise(this.start, H.AccesorCannotDeclareThisParameter));
|
|
4792
4792
|
else if (r.kind === "set") {
|
|
4793
4793
|
if (r[i].length !== 1) this.raise(this.start, "A 'get' accesor must not have any formal parameters.");
|
|
4794
4794
|
else {
|
|
4795
4795
|
var s = r[i][0];
|
|
4796
|
-
this.isThisParam(s) && this.raise(this.start,
|
|
4796
|
+
this.isThisParam(s) && this.raise(this.start, H.AccesorCannotDeclareThisParameter), s.type === "Identifier" && s.optional && this.raise(this.start, H.SetAccesorCannotHaveOptionalParameter), s.type === "RestElement" && this.raise(this.start, H.SetAccesorCannotHaveRestParameter);
|
|
4797
4797
|
}
|
|
4798
|
-
r[a] && this.raise(r[a].start,
|
|
4798
|
+
r[a] && this.raise(r[a].start, H.SetAccesorCannotHaveReturnType);
|
|
4799
4799
|
} else r.kind = "method";
|
|
4800
4800
|
return this.finishNode(r, "TSMethodSignature");
|
|
4801
4801
|
}
|
|
@@ -4832,7 +4832,7 @@ function kn(e) {
|
|
|
4832
4832
|
return this.expect(o.braceR), e;
|
|
4833
4833
|
}, C.tsParseInterfaceDeclaration = function(e, t) {
|
|
4834
4834
|
if (t === void 0 && (t = {}), this.hasFollowingLineBreak()) return null;
|
|
4835
|
-
this.expectContextual("interface"), t.declare && (e.declare = !0), v(this.type) ? (e.id = this.parseIdent(), this.checkLValSimple(e.id, 7)) : (e.id = null, this.raise(this.start,
|
|
4835
|
+
this.expectContextual("interface"), t.declare && (e.declare = !0), v(this.type) ? (e.id = this.parseIdent(), this.checkLValSimple(e.id, 7)) : (e.id = null, this.raise(this.start, H.MissingInterfaceName)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)), this.eat(o._extends) && (e.extends = this.tsParseHeritageClause("extends"));
|
|
4836
4836
|
var n = this.startNode();
|
|
4837
4837
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
|
|
4838
4838
|
}, C.tsParseAbstractDeclaration = function(e) {
|
|
@@ -4850,7 +4850,7 @@ function kn(e) {
|
|
|
4850
4850
|
break;
|
|
4851
4851
|
case "global":
|
|
4852
4852
|
if (this.match(o.braceL)) {
|
|
4853
|
-
e.prototype.enterScope.call(this,
|
|
4853
|
+
e.prototype.enterScope.call(this, pn);
|
|
4854
4854
|
var i = t;
|
|
4855
4855
|
return i.global = !0, i.id = n, i.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
4856
4856
|
}
|
|
@@ -4889,7 +4889,7 @@ function kn(e) {
|
|
|
4889
4889
|
if (n === void 0 && (n = !1), t.id = this.parseIdent(), n || this.checkLValSimple(t.id, 8), this.eat(o.dot)) {
|
|
4890
4890
|
var r = this.startNode();
|
|
4891
4891
|
this.tsParseModuleOrNamespaceDeclaration(r, !0), t.body = r;
|
|
4892
|
-
} else e.prototype.enterScope.call(this,
|
|
4892
|
+
} else e.prototype.enterScope.call(this, pn), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this);
|
|
4893
4893
|
return this.finishNode(t, "TSModuleDeclaration");
|
|
4894
4894
|
}, C.checkLValSimple = function(t, n, r) {
|
|
4895
4895
|
return n === void 0 && (n = 0), e.prototype.checkLValSimple.call(this, t, n, r);
|
|
@@ -4923,7 +4923,7 @@ function kn(e) {
|
|
|
4923
4923
|
}, C.tsParseImportEqualsDeclaration = function(t, n) {
|
|
4924
4924
|
t.isExport = n || !1, t.id = this.parseIdent(), this.checkLValSimple(t.id, 2), e.prototype.expect.call(this, o.eq);
|
|
4925
4925
|
var r = this.tsParseModuleReference();
|
|
4926
|
-
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start,
|
|
4926
|
+
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start, H.ImportAliasHasImportType), t.moduleReference = r, e.prototype.semicolon.call(this), this.finishNode(t, "TSImportEqualsDeclaration");
|
|
4927
4927
|
}, C.isExportDefaultSpecifier = function() {
|
|
4928
4928
|
if (this.tsIsDeclarationStart()) return !1;
|
|
4929
4929
|
var e = this.type;
|
|
@@ -4950,13 +4950,13 @@ function kn(e) {
|
|
|
4950
4950
|
}, C.parseFunction = function(e, t, n, r, i) {
|
|
4951
4951
|
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && 2 & t && this.unexpected(), e.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), 1 & t && (e.id = 4 & t && this.type !== o.name ? null : this.parseIdent());
|
|
4952
4952
|
var a = this.yieldPos, s = this.awaitPos, c = this.awaitIdentPos, l = this.maybeInArrowParameters;
|
|
4953
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4953
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(En(e.async, e.generator)), 1 & t || (e.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(e);
|
|
4954
4954
|
var u = 1 & t;
|
|
4955
4955
|
return this.parseFunctionBody(e, n, !1, i, { isFunctionDeclaration: u }), this.yieldPos = a, this.awaitPos = s, this.awaitIdentPos = c, 1 & t && e.id && !(2 & t) && this.checkLValSimple(e.id, e.body ? this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = l, this.finishNode(e, u ? "FunctionDeclaration" : "FunctionExpression");
|
|
4956
4956
|
}, C.parseFunctionBody = function(t, n, r, i, a) {
|
|
4957
4957
|
n === void 0 && (n = !1), r === void 0 && (r = !1), i === void 0 && (i = !1), this.match(o.colon) && (t.returnType = this.tsParseTypeOrTypePredicateAnnotation(o.colon));
|
|
4958
4958
|
var s = a != null && a.isFunctionDeclaration ? "TSDeclareFunction" : a != null && a.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
4959
|
-
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start,
|
|
4959
|
+
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start, H.DeclareFunctionHasImplementation), t.declare) ? (e.prototype.parseFunctionBody.call(this, t, n, r, !1), this.finishNode(t, s)) : (e.prototype.parseFunctionBody.call(this, t, n, r, i), t);
|
|
4960
4960
|
}, C.parseNew = function() {
|
|
4961
4961
|
var e;
|
|
4962
4962
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
@@ -4997,7 +4997,7 @@ function kn(e) {
|
|
|
4997
4997
|
return this.importOrExportOuterKind = "value", r;
|
|
4998
4998
|
}
|
|
4999
4999
|
}
|
|
5000
|
-
return this.next(), this.type === o.string ? (e.specifiers = [], e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ImportDeclaration"), this.importOrExportOuterKind = "value", e.importKind === "type" && e.specifiers.length > 1 && e.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(e.start,
|
|
5000
|
+
return this.next(), this.type === o.string ? (e.specifiers = [], e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ImportDeclaration"), this.importOrExportOuterKind = "value", e.importKind === "type" && e.specifiers.length > 1 && e.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(e.start, H.TypeImportCannotSpecifyDefaultAndNamed), e;
|
|
5001
5001
|
}, C.parseExportDefaultDeclaration = function() {
|
|
5002
5002
|
if (this.isAbstractClass()) {
|
|
5003
5003
|
var t = this.startNode();
|
|
@@ -5037,7 +5037,7 @@ function kn(e) {
|
|
|
5037
5037
|
else {
|
|
5038
5038
|
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== o.string && this.unexpected(), e.source = this.parseExprAtom(), this.parseMaybeImportAttributes(e);
|
|
5039
5039
|
else {
|
|
5040
|
-
for (var s, c =
|
|
5040
|
+
for (var s, c = un(e.specifiers); !(s = c()).done;) {
|
|
5041
5041
|
var l = s.value;
|
|
5042
5042
|
this.checkUnreserved(l.local), this.checkLocalExport(l.local), l.local.type === "Literal" && this.raise(l.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5043
5043
|
}
|
|
@@ -5050,7 +5050,7 @@ function kn(e) {
|
|
|
5050
5050
|
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), e[t] = !0);
|
|
5051
5051
|
}, C.parseMaybeDefault = function(t, n, r) {
|
|
5052
5052
|
var i = e.prototype.parseMaybeDefault.call(this, t, n, r);
|
|
5053
|
-
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start,
|
|
5053
|
+
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start, H.TypeAnnotationAfterAssign), i;
|
|
5054
5054
|
}, C.typeCastToParameter = function(e) {
|
|
5055
5055
|
return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.end), e.expression;
|
|
5056
5056
|
}, C.toAssignableList = function(t, n) {
|
|
@@ -5099,9 +5099,9 @@ function kn(e) {
|
|
|
5099
5099
|
this.next(), e.prototype.parseVar.call(this, t, !1, n, r || i), this.semicolon();
|
|
5100
5100
|
var a = this.finishNode(t, "VariableDeclaration");
|
|
5101
5101
|
if (!i) return a;
|
|
5102
|
-
for (var o, s =
|
|
5102
|
+
for (var o, s = un(a.declarations); !(o = s()).done;) {
|
|
5103
5103
|
var c = o.value, l = c.init;
|
|
5104
|
-
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start,
|
|
5104
|
+
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, H.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !Dn(l) && this.raise(l.start, H.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
5105
5105
|
}
|
|
5106
5106
|
return a;
|
|
5107
5107
|
}, C.parseStatement = function(t, n, r) {
|
|
@@ -5122,7 +5122,7 @@ function kn(e) {
|
|
|
5122
5122
|
"private"
|
|
5123
5123
|
]);
|
|
5124
5124
|
}, C.parsePostMemberNameModifiers = function(e) {
|
|
5125
|
-
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start,
|
|
5125
|
+
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start, H.ClassMethodHasReadonly), e.declare && this.match(o.parenL) && this.raise(e.start, H.ClassMethodHasDeclare);
|
|
5126
5126
|
}, C.parseExpressionStatement = function(t, n) {
|
|
5127
5127
|
return (n.type === "Identifier" ? this.tsParseExpressionStatement(t, n) : void 0) || e.prototype.parseExpressionStatement.call(this, t, n);
|
|
5128
5128
|
}, C.shouldParseExportStatement = function() {
|
|
@@ -5154,7 +5154,7 @@ function kn(e) {
|
|
|
5154
5154
|
return t.parseExportDeclaration(e);
|
|
5155
5155
|
});
|
|
5156
5156
|
var n = this.start, r = this.startLoc, i = this.eatContextual("declare");
|
|
5157
|
-
!i || !this.ts_isContextual(m.declare) && this.shouldParseExportStatement() || this.raise(this.start,
|
|
5157
|
+
!i || !this.ts_isContextual(m.declare) && this.shouldParseExportStatement() || this.raise(this.start, H.ExpectedAmbientAfterExportDeclare);
|
|
5158
5158
|
var a = v(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
5159
5159
|
return a ? ((a.type === "TSInterfaceDeclaration" || a.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(a, n, r), a.declare = !0), a) : null;
|
|
5160
5160
|
}, C.parseClassId = function(t, n) {
|
|
@@ -5168,19 +5168,19 @@ function kn(e) {
|
|
|
5168
5168
|
var t = this.tsTryParseTypeAnnotation();
|
|
5169
5169
|
t && (e.typeAnnotation = t);
|
|
5170
5170
|
}, C.parseClassField = function(t) {
|
|
5171
|
-
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start,
|
|
5172
|
-
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start,
|
|
5171
|
+
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start, H.PrivateElementHasAbstract), t.accessibility && this.raise(t.start, H.PrivateElementHasAccessibility({ modifier: t.accessibility })), this.parseClassPropertyAnnotation(t);
|
|
5172
|
+
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start, H.DeclareClassFieldHasInitializer), t.abstract && this.match(o.eq)) {
|
|
5173
5173
|
var n = t.key;
|
|
5174
|
-
this.raise(this.start,
|
|
5174
|
+
this.raise(this.start, H.AbstractPropertyHasInitializer({ propertyName: n.type !== "Identifier" || t.computed ? "[" + this.input.slice(n.start, n.end) + "]" : n.name }));
|
|
5175
5175
|
}
|
|
5176
5176
|
return e.prototype.parseClassField.call(this, t);
|
|
5177
5177
|
}, C.parseClassMethod = function(e, t, n, r) {
|
|
5178
5178
|
var i = e.kind === "constructor", a = e.key.type === "PrivateIdentifier", o = this.tsTryParseTypeParameters();
|
|
5179
|
-
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start,
|
|
5179
|
+
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start, H.PrivateMethodsHasAccessibility({ modifier: e.accessibility }))) : o && i && this.raise(o.start, H.ConstructorHasTypeParameters);
|
|
5180
5180
|
var s = e.declare, c = e.kind;
|
|
5181
|
-
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start,
|
|
5181
|
+
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start, H.DeclareAccessor({ kind: c })), o && (e.typeParameters = o);
|
|
5182
5182
|
var l = e.key;
|
|
5183
|
-
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static &&
|
|
5183
|
+
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static && _n(e, "prototype") && this.raise(l.start, "Classes may not have a static property named prototype");
|
|
5184
5184
|
var u = e.value = this.parseMethod(t, n, r, !0, e);
|
|
5185
5185
|
return e.kind === "get" && u.params.length !== 0 && this.raiseRecoverable(u.start, "getter should have no params"), e.kind === "set" && u.params.length !== 1 && this.raiseRecoverable(u.start, "setter should have exactly one param"), e.kind === "set" && u.params[0].type === "RestElement" && this.raiseRecoverable(u.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
5186
5186
|
}, C.isClassMethod = function() {
|
|
@@ -5204,23 +5204,23 @@ function kn(e) {
|
|
|
5204
5204
|
allowedModifiers: d,
|
|
5205
5205
|
disallowedModifiers: ["in", "out"],
|
|
5206
5206
|
stopOnStartOfClassStaticBlock: !0,
|
|
5207
|
-
errorTemplate:
|
|
5207
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
5208
5208
|
}).static;
|
|
5209
5209
|
var f = function() {
|
|
5210
5210
|
if (!n.tsIsStartOfStaticBlocks()) {
|
|
5211
5211
|
var f = n.tsTryParseIndexSignature(a);
|
|
5212
|
-
if (f) return a.abstract && n.raise(a.start,
|
|
5213
|
-
if (!n.inAbstractClass && a.abstract && n.raise(a.start,
|
|
5212
|
+
if (f) return a.abstract && n.raise(a.start, H.IndexSignatureHasAbstract), a.accessibility && n.raise(a.start, H.IndexSignatureHasAccessibility({ modifier: a.accessibility })), a.declare && n.raise(a.start, H.IndexSignatureHasDeclare), a.override && n.raise(a.start, H.IndexSignatureHasOverride), f;
|
|
5213
|
+
if (!n.inAbstractClass && a.abstract && n.raise(a.start, H.NonAbstractClassHasAbstractMethod), a.override && t && n.raise(a.start, H.OverrideNotInSubClass), a.static = r, r && (n.isClassElementNameStart() || n.type === o.star || (s = "static")), !s && i >= 8 && n.eatContextual("async") && (!n.isClassElementNameStart() && n.type !== o.star || n.canInsertSemicolon() ? s = "async" : l = !0), !s && (i >= 9 || !l) && n.eat(o.star) && (c = !0), !s && !l && !c) {
|
|
5214
5214
|
var p = n.value;
|
|
5215
5215
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? u = p : s = p);
|
|
5216
5216
|
}
|
|
5217
5217
|
if (s ? (a.computed = !1, a.key = n.startNodeAt(n.lastTokStart, n.lastTokStartLoc), a.key.name = s, n.finishNode(a.key, "Identifier")) : n.parseClassElementName(a), n.parsePostMemberNameModifiers(a), n.isClassMethod() || i < 13 || n.type === o.parenL || u !== "method" || c || l) {
|
|
5218
|
-
var m = !a.static &&
|
|
5218
|
+
var m = !a.static && _n(a, "constructor"), h = m && t;
|
|
5219
5219
|
m && u !== "method" && n.raise(a.key.start, "Constructor can't have get/set modifier"), a.kind = m ? "constructor" : u, n.parseClassMethod(a, c, l, h);
|
|
5220
5220
|
} else n.parseClassField(a);
|
|
5221
5221
|
return a;
|
|
5222
5222
|
}
|
|
5223
|
-
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start,
|
|
5223
|
+
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start, H.StaticBlockCannotHaveModifier), i >= 13) return e.prototype.parseClassStaticBlock.call(n, a), a;
|
|
5224
5224
|
};
|
|
5225
5225
|
return a.declare ? this.tsInAmbientContext(f) : f(), a;
|
|
5226
5226
|
}, C.isClassElementNameStart = function() {
|
|
@@ -5237,7 +5237,7 @@ function kn(e) {
|
|
|
5237
5237
|
}, C.parseArrowExpression = function(e, t, n, r) {
|
|
5238
5238
|
this.match(o.colon) && (e.returnType = this.tsParseTypeAnnotation());
|
|
5239
5239
|
var i = this.yieldPos, a = this.awaitPos, s = this.awaitIdentPos;
|
|
5240
|
-
this.enterScope(16 |
|
|
5240
|
+
this.enterScope(16 | En(n, !1)), this.initFunction(e);
|
|
5241
5241
|
var c = this.maybeInArrowParameters;
|
|
5242
5242
|
return this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, e.params = this.toAssignableList(t, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = s, this.maybeInArrowParameters = c, this.finishNode(e, "ArrowFunctionExpression");
|
|
5243
5243
|
}, C.parseMaybeAssignOrigin = function(e, t, n) {
|
|
@@ -5246,7 +5246,7 @@ function kn(e) {
|
|
|
5246
5246
|
this.exprAllowed = !1;
|
|
5247
5247
|
}
|
|
5248
5248
|
var r = !1, i = -1, a = -1, s = -1;
|
|
5249
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
5249
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new hn(), r = !0);
|
|
5250
5250
|
var c = this.start, l = this.startLoc;
|
|
5251
5251
|
(this.type === o.parenL || v(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
5252
5252
|
var u = this.parseMaybeConditional(e, t);
|
|
@@ -5273,7 +5273,7 @@ function kn(e) {
|
|
|
5273
5273
|
return (a.type !== "ArrowFunctionExpression" || (i = a.extra) != null && i.parenthesized) && r(), f?.params.length !== 0 && p.resetStartLocationFromNode(a, f), a.typeParameters = f, a;
|
|
5274
5274
|
}, l);
|
|
5275
5275
|
if (!g.error && !g.aborted) return f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5276
|
-
if (!u && (
|
|
5276
|
+
if (!u && (Cn(!0), !(d = this.tryParse(function() {
|
|
5277
5277
|
return p.parseMaybeAssignOrigin(e, t, n);
|
|
5278
5278
|
}, l)).error)) return d.node;
|
|
5279
5279
|
if ((a = u) != null && a.node) return this.setLookaheadState(u.failState), u.node;
|
|
@@ -5294,20 +5294,20 @@ function kn(e) {
|
|
|
5294
5294
|
"override",
|
|
5295
5295
|
"readonly"
|
|
5296
5296
|
]
|
|
5297
|
-
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start,
|
|
5297
|
+
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start, H.UnexpectedParameterModifier);
|
|
5298
5298
|
}
|
|
5299
5299
|
var c = this.parseMaybeDefault(r, i);
|
|
5300
5300
|
this.parseBindingListItem(c);
|
|
5301
5301
|
var l = this.parseMaybeDefault(c.start, c.loc, c);
|
|
5302
5302
|
if (t.length && (l.decorators = t), n || a || o) {
|
|
5303
5303
|
var u = this.startNodeAt(r, i);
|
|
5304
|
-
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start,
|
|
5304
|
+
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start, H.UnsupportedParameterPropertyKind), u.parameter = l, this.finishNode(u, "TSParameterProperty");
|
|
5305
5305
|
}
|
|
5306
5306
|
return l;
|
|
5307
5307
|
}, C.checkLValInnerPattern = function(t, n, r) {
|
|
5308
5308
|
n === void 0 && (n = 0), t.type === "TSParameterProperty" ? this.checkLValInnerPattern(t.parameter, n, r) : e.prototype.checkLValInnerPattern.call(this, t, n, r);
|
|
5309
5309
|
}, C.parseBindingListItem = function(e) {
|
|
5310
|
-
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start,
|
|
5310
|
+
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start, H.PatternIsOptional), e.optional = !0);
|
|
5311
5311
|
var t = this.tsTryParseTypeAnnotation();
|
|
5312
5312
|
return t && (e.typeAnnotation = t), this.resetEndLocation(e), e;
|
|
5313
5313
|
}, C.isAssignable = function(e, t) {
|
|
@@ -5338,12 +5338,12 @@ function kn(e) {
|
|
|
5338
5338
|
default: return !1;
|
|
5339
5339
|
}
|
|
5340
5340
|
}, C.toAssignable = function(t, n, r) {
|
|
5341
|
-
switch (n === void 0 && (n = !1), r === void 0 && (r = new
|
|
5341
|
+
switch (n === void 0 && (n = !1), r === void 0 && (r = new hn()), t.type) {
|
|
5342
5342
|
case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(t, n, r);
|
|
5343
5343
|
case "TSAsExpression":
|
|
5344
5344
|
case "TSSatisfiesExpression":
|
|
5345
5345
|
case "TSNonNullExpression":
|
|
5346
|
-
case "TSTypeAssertion": return n || this.raise(t.start,
|
|
5346
|
+
case "TSTypeAssertion": return n || this.raise(t.start, H.UnexpectedTypeCastInParameter), this.toAssignable(t.expression, n, r);
|
|
5347
5347
|
case "MemberExpression": break;
|
|
5348
5348
|
case "AssignmentExpression": return n || t.left.type !== "TSTypeCastExpression" || (t.left = this.typeCastToParameter(t.left)), e.prototype.toAssignable.call(this, t, n, r);
|
|
5349
5349
|
case "TSTypeCastExpression": return this.typeCastToParameter(t);
|
|
@@ -5395,7 +5395,7 @@ function kn(e) {
|
|
|
5395
5395
|
if (this.options.ecmaVersion >= 6) {
|
|
5396
5396
|
var s = this.maybeInArrowParameters;
|
|
5397
5397
|
this.maybeInArrowParameters = !0, this.next();
|
|
5398
|
-
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new
|
|
5398
|
+
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new hn(), h = this.yieldPos, g = this.awaitPos;
|
|
5399
5399
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR;) {
|
|
5400
5400
|
if (f ? f = !1 : this.expect(o.comma), a && this.afterTrailingComma(o.parenR, !0)) {
|
|
5401
5401
|
p = !0;
|
|
@@ -5464,7 +5464,7 @@ function kn(e) {
|
|
|
5464
5464
|
return u.typeParameters = a, u;
|
|
5465
5465
|
}
|
|
5466
5466
|
if (!r && c.eat(o.parenL)) {
|
|
5467
|
-
var p = new
|
|
5467
|
+
var p = new hn(), m = c.startNodeAt(t, n);
|
|
5468
5468
|
return m.callee = e, m.arguments = c.parseExprList(o.parenR, c.options.ecmaVersion >= 8, !1, p), c.tsCheckForInvalidTypeCasts(m.arguments), m.typeParameters = a, l && (m.optional = d), c.checkExpressionErrors(p, !0), e = c.finishNode(m, "CallExpression");
|
|
5469
5469
|
}
|
|
5470
5470
|
var h = c.type;
|
|
@@ -5473,7 +5473,7 @@ function kn(e) {
|
|
|
5473
5473
|
return _.expression = e, _.typeParameters = a, c.finishNode(_, "TSInstantiationExpression");
|
|
5474
5474
|
}
|
|
5475
5475
|
});
|
|
5476
|
-
if (f && this.unexpected(f), p) return p.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start,
|
|
5476
|
+
if (f && this.unexpected(f), p) return p.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, H.InvalidPropertyAccessAfterInstantiationExpression), e = p;
|
|
5477
5477
|
}
|
|
5478
5478
|
var m = this.options.ecmaVersion >= 11, h = m && this.eat(o.questionDot);
|
|
5479
5479
|
r && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
@@ -5484,7 +5484,7 @@ function kn(e) {
|
|
|
5484
5484
|
} else if (!r && this.eat(o.parenL)) {
|
|
5485
5485
|
var te = this.maybeInArrowParameters;
|
|
5486
5486
|
this.maybeInArrowParameters = !0;
|
|
5487
|
-
var v = new
|
|
5487
|
+
var v = new hn(), ne = this.yieldPos, y = this.awaitPos, b = this.awaitIdentPos;
|
|
5488
5488
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
5489
5489
|
var x = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, v);
|
|
5490
5490
|
if (i && !h && this.shouldParseAsyncArrow()) this.checkPatternErrors(v, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = ne, this.awaitPos = y, this.awaitIdentPos = b, e = this.parseSubscriptAsyncArrow(t, n, x, s);
|
|
@@ -5530,7 +5530,7 @@ function kn(e) {
|
|
|
5530
5530
|
for (this.expect(o.braceL); this.type !== o.braceR;) if (this.match(m.at)) c.push(this.parseDecorator());
|
|
5531
5531
|
else {
|
|
5532
5532
|
var l = this.parseClassElement(e.superClass !== null);
|
|
5533
|
-
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" &&
|
|
5533
|
+
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" && gn(i, l) && this.raiseRecoverable(l.key.start, "Identifier '#" + l.key.name + "' has already been declared"));
|
|
5534
5534
|
}
|
|
5535
5535
|
return this.strict = r, this.next(), c.length && this.raise(this.start, "Decorators must be attached to a class element."), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
5536
5536
|
} finally {
|
|
@@ -5541,9 +5541,9 @@ function kn(e) {
|
|
|
5541
5541
|
return e && (t.typeParameters = e), t;
|
|
5542
5542
|
}, C.parseMethod = function(e, t, n, r, i) {
|
|
5543
5543
|
var a = this.startNode(), s = this.yieldPos, c = this.awaitPos, l = this.awaitIdentPos;
|
|
5544
|
-
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
5544
|
+
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | En(t, a.generator) | (n ? 128 : 0)), this.expect(o.parenL), a.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1, { isClassMethod: r }), this.yieldPos = s, this.awaitPos = c, this.awaitIdentPos = l, i && i.abstract && a.body) {
|
|
5545
5545
|
var u = i.key;
|
|
5546
|
-
this.raise(i.start,
|
|
5546
|
+
this.raise(i.start, H.AbstractMethodHasImplementation({ methodName: u.type !== "Identifier" || i.computed ? "[" + this.input.slice(u.start, u.end) + "]" : u.name }));
|
|
5547
5547
|
}
|
|
5548
5548
|
return this.finishNode(a, "FunctionExpression");
|
|
5549
5549
|
}, t.parse = function(e, t) {
|
|
@@ -5580,7 +5580,7 @@ function kn(e) {
|
|
|
5580
5580
|
ne(this.type) ? (c = !0, s = d, i = n ? this.parseIdent() : this.parseModuleExportName(), l = !1) : (i = f, l = !1);
|
|
5581
5581
|
} else ne(this.type) ? (l = !1, i = n ? this.parseIdent() : this.parseModuleExportName()) : (c = !0, s = d);
|
|
5582
5582
|
} else ne(this.type) && (c = !0, n ? (s = e.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(s)) : s = this.parseModuleExportName());
|
|
5583
|
-
c && r && this.raise(u, n ?
|
|
5583
|
+
c && r && this.raise(u, n ? H.TypeModifierIsUsedInTypeImports : H.TypeModifierIsUsedInTypeExports), t[a] = s, t[o] = i, t[n ? "importKind" : "exportKind"] = c ? "type" : "value", l && this.eatContextual("as") && (t[o] = n ? this.parseIdent() : this.parseModuleExportName()), t[o] || (t[o] = this.copyNode(t[a])), n && this.checkLValSimple(t[o], 2);
|
|
5584
5584
|
}, C.raiseCommonCheck = function(t, n, r) {
|
|
5585
5585
|
return n === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : e.prototype.raise.call(this, t, n) : r ? e.prototype.raiseRecoverable.call(this, t, n) : e.prototype.raise.call(this, t, n);
|
|
5586
5586
|
}, C.raiseRecoverable = function(e, t) {
|
|
@@ -5607,11 +5607,11 @@ function kn(e) {
|
|
|
5607
5607
|
for (r.attributes = []; this.type !== o.slash && this.type !== m.jsxTagEnd;) r.attributes.push(this.jsx_parseAttribute());
|
|
5608
5608
|
return r.selfClosing = this.eat(o.slash), this.expect(m.jsxTagEnd), this.finishNode(r, i ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5609
5609
|
}, C.enterScope = function(t) {
|
|
5610
|
-
t ===
|
|
5610
|
+
t === pn && this.importsStack.push([]), e.prototype.enterScope.call(this, t);
|
|
5611
5611
|
var n = e.prototype.currentScope.call(this);
|
|
5612
5612
|
n.types = [], n.enums = [], n.constEnums = [], n.classes = [], n.exportOnlyBindings = [];
|
|
5613
5613
|
}, C.exitScope = function() {
|
|
5614
|
-
e.prototype.currentScope.call(this).flags ===
|
|
5614
|
+
e.prototype.currentScope.call(this).flags === pn && this.importsStack.pop(), e.prototype.exitScope.call(this);
|
|
5615
5615
|
}, C.hasImport = function(e, t) {
|
|
5616
5616
|
var n = this.importsStack.length;
|
|
5617
5617
|
if (this.importsStack[n - 1].indexOf(e) > -1) return !0;
|
|
@@ -5649,13 +5649,13 @@ function kn(e) {
|
|
|
5649
5649
|
get: function() {
|
|
5650
5650
|
return i;
|
|
5651
5651
|
}
|
|
5652
|
-
}]) &&
|
|
5652
|
+
}]) && an(u.prototype, x), S && an(u, S), Object.defineProperty(u, "prototype", { writable: !1 }), t;
|
|
5653
5653
|
}(t);
|
|
5654
5654
|
};
|
|
5655
5655
|
}
|
|
5656
5656
|
//#endregion
|
|
5657
5657
|
//#region src/utilities/index.ts
|
|
5658
|
-
var
|
|
5658
|
+
var jn = [
|
|
5659
5659
|
{
|
|
5660
5660
|
idPrefix: "dpuse-app",
|
|
5661
5661
|
typeId: "app",
|
|
@@ -5734,8 +5734,8 @@ var An = [
|
|
|
5734
5734
|
publishedTo: "npm",
|
|
5735
5735
|
uploadGroupName: void 0
|
|
5736
5736
|
}
|
|
5737
|
-
],
|
|
5738
|
-
async function
|
|
5737
|
+
], Mn = r(i);
|
|
5738
|
+
async function Nn(e, r) {
|
|
5739
5739
|
e !== void 0 && J(`${e} - clear(${r})`);
|
|
5740
5740
|
let i;
|
|
5741
5741
|
try {
|
|
@@ -5756,15 +5756,15 @@ async function Mn(e, r) {
|
|
|
5756
5756
|
}
|
|
5757
5757
|
}));
|
|
5758
5758
|
}
|
|
5759
|
-
async function
|
|
5759
|
+
async function Pn(e, n) {
|
|
5760
5760
|
return t.readdir(e, n);
|
|
5761
5761
|
}
|
|
5762
|
-
async function
|
|
5762
|
+
async function Fn(e, n, r, i) {
|
|
5763
5763
|
e !== void 0 && J(`${e} - exec(${n} ${r.join(" ")})`);
|
|
5764
|
-
let { stdout: a, stderr: o } = await
|
|
5764
|
+
let { stdout: a, stderr: o } = await Mn(n, r);
|
|
5765
5765
|
i === void 0 ? a.trim() && console.log(a.trim()) : await t.writeFile(i, a.trim(), "utf8"), o.trim() && console.error(o.trim());
|
|
5766
5766
|
}
|
|
5767
|
-
async function
|
|
5767
|
+
async function U(e, t, n, r = !1, i = !1) {
|
|
5768
5768
|
return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
5769
5769
|
a(t, n, {
|
|
5770
5770
|
shell: i,
|
|
@@ -5835,7 +5835,7 @@ function J(e) {
|
|
|
5835
5835
|
console.info(`\n${e}\n`);
|
|
5836
5836
|
}
|
|
5837
5837
|
function Vn(e) {
|
|
5838
|
-
let t =
|
|
5838
|
+
let t = jn.find((t) => e.startsWith(t.idPrefix));
|
|
5839
5839
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
5840
5840
|
return t;
|
|
5841
5841
|
}
|
|
@@ -5843,7 +5843,7 @@ async function Hn(e) {
|
|
|
5843
5843
|
return await t.stat(e);
|
|
5844
5844
|
}
|
|
5845
5845
|
function Un(e) {
|
|
5846
|
-
let t = k.extend(
|
|
5846
|
+
let t = k.extend(An()).parse(e, {
|
|
5847
5847
|
ecmaVersion: "latest",
|
|
5848
5848
|
sourceType: "module",
|
|
5849
5849
|
locations: !0
|
|
@@ -5884,7 +5884,7 @@ function Gn(e, t, n, r) {
|
|
|
5884
5884
|
//#region src/actions/auditDependencies.ts
|
|
5885
5885
|
async function Kn() {
|
|
5886
5886
|
try {
|
|
5887
|
-
K("Audit Dependencies"), await
|
|
5887
|
+
K("Audit Dependencies"), await U("1️⃣ Check using 'npm audit'", "npm", ["audit"]), q("Dependencies audited");
|
|
5888
5888
|
} catch (e) {
|
|
5889
5889
|
console.error("❌ Error auditing dependencies", e), process.exit(1);
|
|
5890
5890
|
}
|
|
@@ -5961,7 +5961,7 @@ async function Y(e, t, r = []) {
|
|
|
5961
5961
|
//#region src/actions/checkDependencies.ts
|
|
5962
5962
|
async function $n() {
|
|
5963
5963
|
try {
|
|
5964
|
-
K("Check Dependencies"), await
|
|
5964
|
+
K("Check Dependencies"), await U("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), J("2️⃣ Check using 'npm-check-updates'");
|
|
5965
5965
|
let e = {};
|
|
5966
5966
|
try {
|
|
5967
5967
|
e = await W(n.resolve(process.cwd(), ".ncurc.json"));
|
|
@@ -5974,85 +5974,99 @@ async function $n() {
|
|
|
5974
5974
|
dep: "dev,prod,peer,optional",
|
|
5975
5975
|
install: "never",
|
|
5976
5976
|
...e
|
|
5977
|
-
}), await
|
|
5977
|
+
}), await U("3️⃣ Install updated dependencies", "npm", [
|
|
5978
|
+
"install",
|
|
5979
|
+
"--prefer-online",
|
|
5980
|
+
"--no-strict-allow-scripts"
|
|
5981
|
+
]);
|
|
5982
|
+
let t = await er();
|
|
5983
|
+
t.length > 0 ? (await U("4️⃣ Move install-script pins to installed versions", "npm", [
|
|
5984
|
+
"install-scripts",
|
|
5985
|
+
"approve",
|
|
5986
|
+
...t
|
|
5987
|
+
]), await U("5️⃣ Run install scripts skipped in step 3", "npm", ["rebuild", ...t])) : J("4️⃣ No pinned install-script approvals to move"), process.platform === "darwin" ? await U("6️⃣ Remove unused install-script entries", "npm", ["install-scripts", "prune"]) : J("6️⃣ Skipped removing unused install-script entries (macOS only)"), await U("7️⃣ List install scripts awaiting review", "npm", ["install-scripts", "ls"]), q("Dependencies checked");
|
|
5978
5988
|
} catch (e) {
|
|
5979
5989
|
console.error("❌ Error checking dependencies", e), process.exit(1);
|
|
5980
5990
|
}
|
|
5981
5991
|
}
|
|
5992
|
+
async function er() {
|
|
5993
|
+
let { allowScripts: e = {} } = await W(n.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
|
|
5994
|
+
return [...new Set(t)];
|
|
5995
|
+
}
|
|
5982
5996
|
//#endregion
|
|
5983
5997
|
//#region src/actions/documentBundleSizes.ts
|
|
5984
|
-
var
|
|
5985
|
-
async function
|
|
5998
|
+
var tr = "<!-- BUNDLE_START -->", nr = "<!-- BUNDLE_END -->", rr = " ", ir = 20, ar = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._";
|
|
5999
|
+
async function or(e) {
|
|
5986
6000
|
try {
|
|
5987
6001
|
K("Document Bundle Sizes"), J("1️⃣ Read bundle analysis report");
|
|
5988
6002
|
let t = await W("./bundle-analysis-reports/sonda/index.json");
|
|
5989
6003
|
J("2️⃣ Insert table into 'README.md'");
|
|
5990
|
-
let n =
|
|
5991
|
-
await Bn("README.md", Gn(await G("./README.md"), `\n${
|
|
6004
|
+
let n = sr(t, e?.moduleLevel ?? !1);
|
|
6005
|
+
await Bn("README.md", Gn(await G("./README.md"), `\n${ar}\n\n${n}\n\n(unassigned) = bytes Sonda can't trace to a specific source line (whitespace, stray keywords, bundler-injected region markers) — not actual missing/unknown code.`, tr, nr)), q("Bundle sizes documented");
|
|
5992
6006
|
} catch (e) {
|
|
5993
6007
|
console.error("❌ Error documenting bundle sizes", e), process.exit(1);
|
|
5994
6008
|
}
|
|
5995
6009
|
}
|
|
5996
|
-
function
|
|
5997
|
-
let n =
|
|
6010
|
+
function sr(e, t) {
|
|
6011
|
+
let n = pr(e), r = n.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), i = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, _r(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
|
|
5998
6012
|
for (let [e, o] of i) {
|
|
5999
|
-
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ?
|
|
6013
|
+
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? cr(e, o, dr(i), r, t) : lr(e, o, i, r, t);
|
|
6000
6014
|
a.push(...s);
|
|
6001
6015
|
}
|
|
6002
6016
|
return a.join("\n");
|
|
6003
6017
|
}
|
|
6004
|
-
function
|
|
6018
|
+
function cr(e, t, n, r, i) {
|
|
6005
6019
|
let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
|
|
6006
|
-
if (s.size === 1) return [`| ${e} → ${a} → ${
|
|
6007
|
-
let l = [`| ${e} → ${a} | ${
|
|
6008
|
-
return i || l.push(...
|
|
6020
|
+
if (s.size === 1) return [`| ${e} → ${a} → ${fr(s)} | ${vr(t)} · ${yr(c)} |`];
|
|
6021
|
+
let l = [`| ${e} → ${a} | ${vr(t)} · ${yr(c)} |`];
|
|
6022
|
+
return i || l.push(...ur(s, rr, r)), l;
|
|
6009
6023
|
}
|
|
6010
|
-
function
|
|
6011
|
-
let a = [`| ${e} | ${
|
|
6024
|
+
function lr(e, t, n, r, i) {
|
|
6025
|
+
let a = [`| ${e} | ${vr(t)} |`];
|
|
6012
6026
|
for (let [e, { sizes: t, files: o }] of n) {
|
|
6013
6027
|
let n = r > 0 ? t.uncompressed / r * 100 : 0;
|
|
6014
6028
|
if (o.size === 1) {
|
|
6015
|
-
let t =
|
|
6016
|
-
a.push(`| ${
|
|
6029
|
+
let t = fr(o);
|
|
6030
|
+
a.push(`| ${rr}${e} → ${t} | ${yr(n)} |`);
|
|
6017
6031
|
continue;
|
|
6018
6032
|
}
|
|
6019
|
-
a.push(`| ${
|
|
6033
|
+
a.push(`| ${rr}${e} | ${yr(n)} |`), i || a.push(...ur(o, `${rr}${rr}`, r));
|
|
6020
6034
|
}
|
|
6021
6035
|
return a;
|
|
6022
6036
|
}
|
|
6023
|
-
function
|
|
6024
|
-
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${
|
|
6037
|
+
function ur(e, t, n) {
|
|
6038
|
+
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${yr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
|
|
6025
6039
|
}
|
|
6026
|
-
function
|
|
6040
|
+
function dr(e) {
|
|
6027
6041
|
let [t] = e;
|
|
6028
6042
|
if (t === void 0) throw Error("Expected exactly one entry");
|
|
6029
6043
|
return t;
|
|
6030
6044
|
}
|
|
6031
|
-
function
|
|
6045
|
+
function fr(e) {
|
|
6032
6046
|
let [t] = e.keys();
|
|
6033
6047
|
if (t === void 0) throw Error("Expected exactly one file");
|
|
6034
6048
|
return t;
|
|
6035
6049
|
}
|
|
6036
|
-
function
|
|
6037
|
-
let t =
|
|
6050
|
+
function pr(e) {
|
|
6051
|
+
let t = mr(e.dependencies), n = /* @__PURE__ */ new Map();
|
|
6038
6052
|
for (let r of e.resources) {
|
|
6039
6053
|
if (r.kind !== "chunk" || !r.parent) continue;
|
|
6040
|
-
let { group: e, file: i } =
|
|
6054
|
+
let { group: e, file: i } = hr(r.name, t), a = _r(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
|
|
6041
6055
|
n.set(r.parent, o);
|
|
6042
6056
|
let s = o.get(e) ?? {
|
|
6043
|
-
sizes:
|
|
6057
|
+
sizes: br(),
|
|
6044
6058
|
files: /* @__PURE__ */ new Map()
|
|
6045
6059
|
};
|
|
6046
|
-
o.set(e, s),
|
|
6047
|
-
let c = s.files.get(i) ??
|
|
6048
|
-
s.files.set(i, c),
|
|
6060
|
+
o.set(e, s), xr(s.sizes, a);
|
|
6061
|
+
let c = s.files.get(i) ?? br();
|
|
6062
|
+
s.files.set(i, c), xr(c, a);
|
|
6049
6063
|
}
|
|
6050
6064
|
return n;
|
|
6051
6065
|
}
|
|
6052
|
-
function
|
|
6066
|
+
function mr(e) {
|
|
6053
6067
|
return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
|
|
6054
6068
|
}
|
|
6055
|
-
function
|
|
6069
|
+
function hr(e, t) {
|
|
6056
6070
|
let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
|
|
6057
6071
|
if (n) {
|
|
6058
6072
|
let [t, r] = n;
|
|
@@ -6069,52 +6083,52 @@ function mr(e, t) {
|
|
|
6069
6083
|
file: e.slice(1)
|
|
6070
6084
|
} : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
|
|
6071
6085
|
group: "wasm",
|
|
6072
|
-
file:
|
|
6086
|
+
file: gr(e)
|
|
6073
6087
|
} : {
|
|
6074
6088
|
group: "src",
|
|
6075
|
-
file:
|
|
6089
|
+
file: gr(e)
|
|
6076
6090
|
};
|
|
6077
6091
|
}
|
|
6078
|
-
function
|
|
6092
|
+
function gr(e) {
|
|
6079
6093
|
return e.split("/").at(-1) ?? e;
|
|
6080
6094
|
}
|
|
6081
|
-
function
|
|
6095
|
+
function _r(e) {
|
|
6082
6096
|
return {
|
|
6083
6097
|
uncompressed: e.uncompressed,
|
|
6084
6098
|
brotli: e.brotli ?? 0
|
|
6085
6099
|
};
|
|
6086
6100
|
}
|
|
6087
|
-
function _r(e) {
|
|
6088
|
-
return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
|
|
6089
|
-
}
|
|
6090
6101
|
function vr(e) {
|
|
6091
|
-
|
|
6092
|
-
return `\`${"█".repeat(t)}${"░".repeat(rr - t)}\` ${e.toFixed(1)}%`;
|
|
6102
|
+
return `${Sr(e.uncompressed)} · brotli ${Sr(e.brotli)}`;
|
|
6093
6103
|
}
|
|
6094
|
-
function yr() {
|
|
6104
|
+
function yr(e) {
|
|
6105
|
+
let t = Math.round(e / 100 * ir);
|
|
6106
|
+
return `\`${"█".repeat(t)}${"░".repeat(ir - t)}\` ${e.toFixed(1)}%`;
|
|
6107
|
+
}
|
|
6108
|
+
function br() {
|
|
6095
6109
|
return {
|
|
6096
6110
|
uncompressed: 0,
|
|
6097
6111
|
brotli: 0
|
|
6098
6112
|
};
|
|
6099
6113
|
}
|
|
6100
|
-
function
|
|
6114
|
+
function xr(e, t) {
|
|
6101
6115
|
e.uncompressed += t.uncompressed, e.brotli += t.brotli;
|
|
6102
6116
|
}
|
|
6103
|
-
function
|
|
6117
|
+
function Sr(e) {
|
|
6104
6118
|
return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
|
|
6105
6119
|
}
|
|
6106
6120
|
//#endregion
|
|
6107
6121
|
//#region src/actions/documentDependencies.ts
|
|
6108
|
-
var
|
|
6109
|
-
async function
|
|
6122
|
+
var Cr = "<!-- DEPENDENCY_LICENSES_START -->", wr = "<!-- DEPENDENCY_LICENSES_END -->", Tr = "<!-- DEPENDENCY_TREE_START -->", Er = "<!-- DEPENDENCY_TREE_END -->", Dr = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are simply mature and stable, requiring no active development.";
|
|
6123
|
+
async function Or(e = "MIT") {
|
|
6110
6124
|
try {
|
|
6111
6125
|
K("Document Dependencies");
|
|
6112
6126
|
let t = await W("package.json");
|
|
6113
6127
|
if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
|
|
6114
|
-
await
|
|
6128
|
+
await kr(t.name), q("Dependencies documented");
|
|
6115
6129
|
return;
|
|
6116
6130
|
}
|
|
6117
|
-
await
|
|
6131
|
+
await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), J("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
6118
6132
|
let i = {
|
|
6119
6133
|
start: process.cwd(),
|
|
6120
6134
|
production: !0,
|
|
@@ -6134,38 +6148,38 @@ async function Dr(e = "MIT") {
|
|
|
6134
6148
|
"--all",
|
|
6135
6149
|
"--json",
|
|
6136
6150
|
"--omit=dev"
|
|
6137
|
-
], "licenses/licenseTree.json"), await
|
|
6151
|
+
], "licenses/licenseTree.json"), await Ar("4️⃣ ", e), q("Dependencies documented");
|
|
6138
6152
|
} catch (e) {
|
|
6139
6153
|
console.error("❌ Error documenting dependencies", e), process.exit(1);
|
|
6140
6154
|
}
|
|
6141
6155
|
}
|
|
6142
|
-
async function
|
|
6156
|
+
async function kr(e) {
|
|
6143
6157
|
J(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
|
|
6144
6158
|
let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
|
|
6145
|
-
await Bn("README.md", Gn(Gn(await G("./README.md"), t,
|
|
6159
|
+
await Bn("README.md", Gn(Gn(await G("./README.md"), t, Cr, wr), "", Tr, Er));
|
|
6146
6160
|
}
|
|
6147
|
-
async function
|
|
6161
|
+
async function Ar(e, t) {
|
|
6148
6162
|
J(`${e} Insert licenses into 'README.md'`);
|
|
6149
6163
|
let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
|
|
6150
|
-
for (let [e, t] of Object.entries(n)) i.set(e,
|
|
6164
|
+
for (let [e, t] of Object.entries(n)) i.set(e, Nr(e, t));
|
|
6151
6165
|
await Promise.all(i.values().map(async (e) => {
|
|
6152
|
-
let t = await
|
|
6166
|
+
let t = await Pr(e.name, e.installedVersion);
|
|
6153
6167
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6154
6168
|
}));
|
|
6155
|
-
let a = `${
|
|
6156
|
-
for (let e of i.values()) a +=
|
|
6169
|
+
let a = `${jr(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
|
|
6170
|
+
for (let e of i.values()) a += Fr(e);
|
|
6157
6171
|
let o = [];
|
|
6158
|
-
r.dependencies != null &&
|
|
6159
|
-
let s = `${
|
|
6160
|
-
await Bn("README.md", Gn(Gn(await G("./README.md"), a,
|
|
6161
|
-
}
|
|
6162
|
-
function Ar(e) {
|
|
6163
|
-
return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${jr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
|
|
6172
|
+
r.dependencies != null && Ir(r.dependencies, i, o, 0);
|
|
6173
|
+
let s = `${Dr}\n\n${o.join("\n")}`;
|
|
6174
|
+
await Bn("README.md", Gn(Gn(await G("./README.md"), a, Cr, wr), s, Tr, Er));
|
|
6164
6175
|
}
|
|
6165
6176
|
function jr(e) {
|
|
6177
|
+
return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${Mr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
|
|
6178
|
+
}
|
|
6179
|
+
function Mr(e) {
|
|
6166
6180
|
return e.length === 1 ? e[0] ?? "" : e.length === 2 ? `${String(e[0])} or ${String(e[1])}` : `${e.slice(0, -1).join(", ")}, or ${String(e.at(-1))}`;
|
|
6167
6181
|
}
|
|
6168
|
-
function
|
|
6182
|
+
function Nr(e, t) {
|
|
6169
6183
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6170
6184
|
return {
|
|
6171
6185
|
name: r,
|
|
@@ -6179,7 +6193,7 @@ function Mr(e, t) {
|
|
|
6179
6193
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6180
6194
|
};
|
|
6181
6195
|
}
|
|
6182
|
-
async function
|
|
6196
|
+
async function Pr(e, t) {
|
|
6183
6197
|
try {
|
|
6184
6198
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6185
6199
|
if (n.ok) {
|
|
@@ -6197,25 +6211,25 @@ async function Nr(e, t) {
|
|
|
6197
6211
|
publishedDate: ""
|
|
6198
6212
|
};
|
|
6199
6213
|
}
|
|
6200
|
-
function
|
|
6214
|
+
function Fr(e) {
|
|
6201
6215
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6202
6216
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6203
6217
|
}
|
|
6204
|
-
function
|
|
6218
|
+
function Ir(e, t, n, r) {
|
|
6205
6219
|
let i = " ".repeat(r);
|
|
6206
6220
|
for (let [a, o] of Object.entries(e)) {
|
|
6207
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6208
|
-
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null &&
|
|
6221
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Lr(s);
|
|
6222
|
+
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Ir(o.dependencies, t, n, r + 1);
|
|
6209
6223
|
}
|
|
6210
6224
|
}
|
|
6211
|
-
function
|
|
6225
|
+
function Lr(e) {
|
|
6212
6226
|
if (e == null) return "";
|
|
6213
|
-
let t = e.publishedDate ?
|
|
6227
|
+
let t = e.publishedDate ? Rr(e.publishedDate.split("T", 1)[0]) : "";
|
|
6214
6228
|
if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
|
|
6215
|
-
let n = e.latestPublishedDate ?
|
|
6229
|
+
let n = e.latestPublishedDate ? Rr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
|
|
6216
6230
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6217
6231
|
}
|
|
6218
|
-
function
|
|
6232
|
+
function Rr(e) {
|
|
6219
6233
|
if (e == null || e === "") return "n/a";
|
|
6220
6234
|
let t = e.split("T", 1)[0];
|
|
6221
6235
|
if (t == null || t === "") return "n/a";
|
|
@@ -6224,17 +6238,17 @@ function Lr(e) {
|
|
|
6224
6238
|
}
|
|
6225
6239
|
//#endregion
|
|
6226
6240
|
//#region src/actions/documentGovernance.ts
|
|
6227
|
-
var
|
|
6228
|
-
async function
|
|
6241
|
+
var zr = "<!-- GOVERNANCE_START -->", Br = "<!-- GOVERNANCE_END -->";
|
|
6242
|
+
async function Vr() {
|
|
6229
6243
|
try {
|
|
6230
6244
|
K("Document Governance"), J("1️⃣ Insert governance content into 'README.md'");
|
|
6231
|
-
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } =
|
|
6232
|
-
await Bn("README.md", Gn(await G("./README.md"), i,
|
|
6245
|
+
let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } = Hr(e), i = Gr(n, r, Ur(e), Wr(t.firstCreatedAt));
|
|
6246
|
+
await Bn("README.md", Gn(await G("./README.md"), i, zr, Br)), q("Governance documented");
|
|
6233
6247
|
} catch (e) {
|
|
6234
6248
|
console.error("❌ Error documenting governance", e), process.exit(1);
|
|
6235
6249
|
}
|
|
6236
6250
|
}
|
|
6237
|
-
function
|
|
6251
|
+
function Hr(e) {
|
|
6238
6252
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6239
6253
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
|
|
6240
6254
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6244,18 +6258,18 @@ function Vr(e) {
|
|
|
6244
6258
|
repo: i[2]
|
|
6245
6259
|
};
|
|
6246
6260
|
}
|
|
6247
|
-
function
|
|
6261
|
+
function Ur(e) {
|
|
6248
6262
|
let t = e.author, n = typeof t == "string" ? t : t?.name;
|
|
6249
6263
|
if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
|
|
6250
6264
|
return n.replace(/\s*<[^>]*>\s*/, "").trim();
|
|
6251
6265
|
}
|
|
6252
|
-
function
|
|
6266
|
+
function Wr(e) {
|
|
6253
6267
|
let t = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6254
6268
|
if (e == null) return String(t);
|
|
6255
6269
|
let n = new Date(e).getFullYear();
|
|
6256
6270
|
return n === t ? String(t) : `${String(n)}-present`;
|
|
6257
6271
|
}
|
|
6258
|
-
function
|
|
6272
|
+
function Gr(e, t, n, r) {
|
|
6259
6273
|
let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
|
|
6260
6274
|
return `## Security & Quality
|
|
6261
6275
|
|
|
@@ -6302,28 +6316,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
|
|
|
6302
6316
|
}
|
|
6303
6317
|
//#endregion
|
|
6304
6318
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-Dxqinpxy.js
|
|
6305
|
-
var
|
|
6319
|
+
var Kr = {
|
|
6306
6320
|
lang: void 0,
|
|
6307
6321
|
message: void 0,
|
|
6308
6322
|
abortEarly: void 0,
|
|
6309
6323
|
abortPipeEarly: void 0
|
|
6310
6324
|
};
|
|
6311
6325
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6312
|
-
function
|
|
6326
|
+
function qr(e) {
|
|
6313
6327
|
return e ? {
|
|
6314
6328
|
lang: e?.lang ?? void 0,
|
|
6315
6329
|
message: e?.message,
|
|
6316
6330
|
abortEarly: e?.abortEarly ?? void 0,
|
|
6317
6331
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
6318
|
-
} :
|
|
6332
|
+
} : Kr;
|
|
6319
6333
|
}
|
|
6320
6334
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6321
|
-
function
|
|
6335
|
+
function Jr(e) {
|
|
6322
6336
|
let t = typeof e;
|
|
6323
6337
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6324
6338
|
}
|
|
6325
6339
|
function X(e, t, n, r, i) {
|
|
6326
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
6340
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Jr(a), c = {
|
|
6327
6341
|
kind: e.kind,
|
|
6328
6342
|
type: e.type,
|
|
6329
6343
|
input: a,
|
|
@@ -6340,39 +6354,39 @@ function X(e, t, n, r, i) {
|
|
|
6340
6354
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
6341
6355
|
}
|
|
6342
6356
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6343
|
-
function
|
|
6357
|
+
function Yr(e, t) {
|
|
6344
6358
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
6345
6359
|
}
|
|
6346
6360
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6347
|
-
function
|
|
6361
|
+
function Xr(e, t) {
|
|
6348
6362
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6349
6363
|
}
|
|
6350
6364
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6351
|
-
function
|
|
6365
|
+
function Zr(e, t) {
|
|
6352
6366
|
let n = [...new Set(e)];
|
|
6353
6367
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6354
6368
|
}
|
|
6355
|
-
function
|
|
6369
|
+
function Qr(e) {
|
|
6356
6370
|
return e["~standard"] = {
|
|
6357
6371
|
version: 1,
|
|
6358
6372
|
vendor: "valibot",
|
|
6359
|
-
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */
|
|
6373
|
+
validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ qr())
|
|
6360
6374
|
}, e;
|
|
6361
6375
|
}
|
|
6362
6376
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6363
|
-
function
|
|
6377
|
+
function $r(e, t, n) {
|
|
6364
6378
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6365
6379
|
}
|
|
6366
6380
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6367
|
-
function
|
|
6381
|
+
function ei(e, t, n) {
|
|
6368
6382
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6369
6383
|
}
|
|
6370
6384
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6371
|
-
function
|
|
6372
|
-
return
|
|
6385
|
+
function ti(e, t) {
|
|
6386
|
+
return Qr({
|
|
6373
6387
|
kind: "schema",
|
|
6374
6388
|
type: "array",
|
|
6375
|
-
reference:
|
|
6389
|
+
reference: ti,
|
|
6376
6390
|
expects: "Array",
|
|
6377
6391
|
async: !1,
|
|
6378
6392
|
item: e,
|
|
@@ -6405,11 +6419,11 @@ function ei(e, t) {
|
|
|
6405
6419
|
});
|
|
6406
6420
|
}
|
|
6407
6421
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6408
|
-
function
|
|
6409
|
-
return
|
|
6422
|
+
function ni(e) {
|
|
6423
|
+
return Qr({
|
|
6410
6424
|
kind: "schema",
|
|
6411
6425
|
type: "boolean",
|
|
6412
|
-
reference:
|
|
6426
|
+
reference: ni,
|
|
6413
6427
|
expects: "boolean",
|
|
6414
6428
|
async: !1,
|
|
6415
6429
|
message: e,
|
|
@@ -6419,23 +6433,23 @@ function ti(e) {
|
|
|
6419
6433
|
});
|
|
6420
6434
|
}
|
|
6421
6435
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6422
|
-
function
|
|
6423
|
-
return
|
|
6436
|
+
function ri(e, t) {
|
|
6437
|
+
return Qr({
|
|
6424
6438
|
kind: "schema",
|
|
6425
6439
|
type: "literal",
|
|
6426
|
-
reference:
|
|
6427
|
-
expects: /* @__PURE__ */
|
|
6440
|
+
reference: ri,
|
|
6441
|
+
expects: /* @__PURE__ */ Jr(e),
|
|
6428
6442
|
async: !1,
|
|
6429
6443
|
literal: e,
|
|
6430
6444
|
message: t,
|
|
6431
6445
|
"~run"(e, t) {
|
|
6432
|
-
return /* @__PURE__ */
|
|
6446
|
+
return /* @__PURE__ */ Yr(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
|
|
6433
6447
|
}
|
|
6434
6448
|
});
|
|
6435
6449
|
}
|
|
6436
6450
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6437
6451
|
function Z(e, t) {
|
|
6438
|
-
return
|
|
6452
|
+
return Qr({
|
|
6439
6453
|
kind: "schema",
|
|
6440
6454
|
type: "nullable",
|
|
6441
6455
|
reference: Z,
|
|
@@ -6444,16 +6458,16 @@ function Z(e, t) {
|
|
|
6444
6458
|
wrapped: e,
|
|
6445
6459
|
default: t,
|
|
6446
6460
|
"~run"(e, t) {
|
|
6447
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6461
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ ei(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6448
6462
|
}
|
|
6449
6463
|
});
|
|
6450
6464
|
}
|
|
6451
6465
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6452
|
-
function
|
|
6453
|
-
return
|
|
6466
|
+
function ii(e) {
|
|
6467
|
+
return Qr({
|
|
6454
6468
|
kind: "schema",
|
|
6455
6469
|
type: "number",
|
|
6456
|
-
reference:
|
|
6470
|
+
reference: ii,
|
|
6457
6471
|
expects: "number",
|
|
6458
6472
|
async: !1,
|
|
6459
6473
|
message: e,
|
|
@@ -6464,7 +6478,7 @@ function ri(e) {
|
|
|
6464
6478
|
}
|
|
6465
6479
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6466
6480
|
function Q(e, t) {
|
|
6467
|
-
return
|
|
6481
|
+
return Qr({
|
|
6468
6482
|
kind: "schema",
|
|
6469
6483
|
type: "object",
|
|
6470
6484
|
reference: Q,
|
|
@@ -6479,7 +6493,7 @@ function Q(e, t) {
|
|
|
6479
6493
|
for (let r in this.entries) {
|
|
6480
6494
|
let i = this.entries[r];
|
|
6481
6495
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6482
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
6496
|
+
let a = r in n ? n[r] : /* @__PURE__ */ ei(i), o = i["~run"]({ value: a }, t);
|
|
6483
6497
|
if (o.issues) {
|
|
6484
6498
|
let i = {
|
|
6485
6499
|
type: "object",
|
|
@@ -6495,7 +6509,7 @@ function Q(e, t) {
|
|
|
6495
6509
|
}
|
|
6496
6510
|
}
|
|
6497
6511
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6498
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6512
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ $r(i);
|
|
6499
6513
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
|
|
6500
6514
|
input: void 0,
|
|
6501
6515
|
expected: `"${r}"`,
|
|
@@ -6514,26 +6528,26 @@ function Q(e, t) {
|
|
|
6514
6528
|
});
|
|
6515
6529
|
}
|
|
6516
6530
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6517
|
-
function
|
|
6518
|
-
return
|
|
6531
|
+
function ai(e, t) {
|
|
6532
|
+
return Qr({
|
|
6519
6533
|
kind: "schema",
|
|
6520
6534
|
type: "optional",
|
|
6521
|
-
reference:
|
|
6535
|
+
reference: ai,
|
|
6522
6536
|
expects: `(${e.expects} | undefined)`,
|
|
6523
6537
|
async: !1,
|
|
6524
6538
|
wrapped: e,
|
|
6525
6539
|
default: t,
|
|
6526
6540
|
"~run"(e, t) {
|
|
6527
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6541
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ ei(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6528
6542
|
}
|
|
6529
6543
|
});
|
|
6530
6544
|
}
|
|
6531
6545
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6532
|
-
function
|
|
6533
|
-
return
|
|
6546
|
+
function oi(e, t, n) {
|
|
6547
|
+
return Qr({
|
|
6534
6548
|
kind: "schema",
|
|
6535
6549
|
type: "record",
|
|
6536
|
-
reference:
|
|
6550
|
+
reference: oi,
|
|
6537
6551
|
expects: "Object",
|
|
6538
6552
|
async: !1,
|
|
6539
6553
|
key: e,
|
|
@@ -6543,7 +6557,7 @@ function ai(e, t, n) {
|
|
|
6543
6557
|
let n = e.value;
|
|
6544
6558
|
if (n && typeof n == "object") {
|
|
6545
6559
|
e.typed = !0, e.value = {};
|
|
6546
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6560
|
+
for (let r in n) if (/* @__PURE__ */ Xr(n, r)) {
|
|
6547
6561
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6548
6562
|
if (a.issues) {
|
|
6549
6563
|
let o = {
|
|
@@ -6583,7 +6597,7 @@ function ai(e, t, n) {
|
|
|
6583
6597
|
}
|
|
6584
6598
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6585
6599
|
function $(e) {
|
|
6586
|
-
return
|
|
6600
|
+
return Qr({
|
|
6587
6601
|
kind: "schema",
|
|
6588
6602
|
type: "string",
|
|
6589
6603
|
reference: $,
|
|
@@ -6596,19 +6610,19 @@ function $(e) {
|
|
|
6596
6610
|
});
|
|
6597
6611
|
}
|
|
6598
6612
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6599
|
-
function
|
|
6613
|
+
function si(e) {
|
|
6600
6614
|
let t;
|
|
6601
6615
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6602
6616
|
else t = n.issues;
|
|
6603
6617
|
return t;
|
|
6604
6618
|
}
|
|
6605
6619
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6606
|
-
function
|
|
6607
|
-
return
|
|
6620
|
+
function ci(e, t) {
|
|
6621
|
+
return Qr({
|
|
6608
6622
|
kind: "schema",
|
|
6609
6623
|
type: "union",
|
|
6610
|
-
reference:
|
|
6611
|
-
expects: /* @__PURE__ */
|
|
6624
|
+
reference: ci,
|
|
6625
|
+
expects: /* @__PURE__ */ Zr(e.map((e) => e.expects), "|"),
|
|
6612
6626
|
async: !1,
|
|
6613
6627
|
options: e,
|
|
6614
6628
|
message: t,
|
|
@@ -6627,29 +6641,29 @@ function si(e, t) {
|
|
|
6627
6641
|
if (n) return n;
|
|
6628
6642
|
if (r) {
|
|
6629
6643
|
if (r.length === 1) return r[0];
|
|
6630
|
-
X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6644
|
+
X(this, "type", e, t, { issues: /* @__PURE__ */ si(r) }), e.typed = !0;
|
|
6631
6645
|
} else if (i?.length === 1) return i[0];
|
|
6632
|
-
else X(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6646
|
+
else X(this, "type", e, t, { issues: /* @__PURE__ */ si(i) });
|
|
6633
6647
|
return e;
|
|
6634
6648
|
}
|
|
6635
6649
|
});
|
|
6636
6650
|
}
|
|
6637
|
-
var
|
|
6651
|
+
var li = /* @__PURE__ */ Q({
|
|
6638
6652
|
en: /* @__PURE__ */ $(),
|
|
6639
6653
|
es: /* @__PURE__ */ $()
|
|
6640
|
-
}),
|
|
6654
|
+
}), ui = {
|
|
6641
6655
|
id: /* @__PURE__ */ $(),
|
|
6642
6656
|
label: /* @__PURE__ */ Q({
|
|
6643
|
-
en: /* @__PURE__ */
|
|
6644
|
-
es: /* @__PURE__ */
|
|
6657
|
+
en: /* @__PURE__ */ ai(/* @__PURE__ */ $()),
|
|
6658
|
+
es: /* @__PURE__ */ ai(/* @__PURE__ */ $())
|
|
6645
6659
|
}),
|
|
6646
6660
|
description: /* @__PURE__ */ Q({
|
|
6647
|
-
en: /* @__PURE__ */
|
|
6648
|
-
es: /* @__PURE__ */
|
|
6661
|
+
en: /* @__PURE__ */ ai(/* @__PURE__ */ $()),
|
|
6662
|
+
es: /* @__PURE__ */ ai(/* @__PURE__ */ $())
|
|
6649
6663
|
}),
|
|
6650
6664
|
icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6651
6665
|
iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
|
|
6652
|
-
},
|
|
6666
|
+
}, di = (e) => /* @__PURE__ */ ci(e.map((e) => /* @__PURE__ */ ri(e))), fi = di([
|
|
6653
6667
|
"app",
|
|
6654
6668
|
"connector",
|
|
6655
6669
|
"connectorConnection",
|
|
@@ -6671,33 +6685,33 @@ var ci = /* @__PURE__ */ Q({
|
|
|
6671
6685
|
"presenter",
|
|
6672
6686
|
"presenterPresentation",
|
|
6673
6687
|
"tool"
|
|
6674
|
-
]),
|
|
6688
|
+
]), pi = di([
|
|
6675
6689
|
"danger",
|
|
6676
6690
|
"success",
|
|
6677
6691
|
"warning"
|
|
6678
|
-
]),
|
|
6692
|
+
]), mi = di([
|
|
6679
6693
|
"alpha",
|
|
6680
6694
|
"beta",
|
|
6681
6695
|
"releaseCandidate",
|
|
6682
6696
|
"generalAvailability"
|
|
6683
|
-
]),
|
|
6684
|
-
color:
|
|
6697
|
+
]), hi = /* @__PURE__ */ Q({
|
|
6698
|
+
color: pi,
|
|
6685
6699
|
label: /* @__PURE__ */ $()
|
|
6686
|
-
}),
|
|
6687
|
-
...
|
|
6688
|
-
typeId:
|
|
6689
|
-
},
|
|
6690
|
-
...
|
|
6691
|
-
order: /* @__PURE__ */
|
|
6700
|
+
}), gi = {
|
|
6701
|
+
...ui,
|
|
6702
|
+
typeId: fi
|
|
6703
|
+
}, _i = /* @__PURE__ */ Q({
|
|
6704
|
+
...gi,
|
|
6705
|
+
order: /* @__PURE__ */ ii(),
|
|
6692
6706
|
path: /* @__PURE__ */ $()
|
|
6693
|
-
}),
|
|
6694
|
-
...
|
|
6695
|
-
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6696
|
-
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6697
|
-
status: /* @__PURE__ */ Z(
|
|
6698
|
-
statusId: /* @__PURE__ */ Z(
|
|
6707
|
+
}), vi = {
|
|
6708
|
+
...gi,
|
|
6709
|
+
firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ii()),
|
|
6710
|
+
lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ii()),
|
|
6711
|
+
status: /* @__PURE__ */ Z(hi),
|
|
6712
|
+
statusId: /* @__PURE__ */ Z(mi)
|
|
6699
6713
|
};
|
|
6700
|
-
({ ...
|
|
6714
|
+
({ ...vi }), di([
|
|
6701
6715
|
"app",
|
|
6702
6716
|
"engine",
|
|
6703
6717
|
"connector",
|
|
@@ -6707,17 +6721,17 @@ var ci = /* @__PURE__ */ Q({
|
|
|
6707
6721
|
]);
|
|
6708
6722
|
//#endregion
|
|
6709
6723
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-B_EBeUaj.js
|
|
6710
|
-
var
|
|
6711
|
-
...
|
|
6724
|
+
var yi = {
|
|
6725
|
+
...vi,
|
|
6712
6726
|
vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6713
6727
|
vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6714
6728
|
vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
|
|
6715
6729
|
version: /* @__PURE__ */ $()
|
|
6716
6730
|
};
|
|
6717
|
-
({ ...
|
|
6731
|
+
({ ...yi });
|
|
6718
6732
|
//#endregion
|
|
6719
6733
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6720
|
-
var
|
|
6734
|
+
var bi = di([
|
|
6721
6735
|
"abortOperation",
|
|
6722
6736
|
"auditObjectContent",
|
|
6723
6737
|
"createObject",
|
|
@@ -6733,38 +6747,38 @@ var yi = ui([
|
|
|
6733
6747
|
"retrieveChunks",
|
|
6734
6748
|
"retrieveRecords",
|
|
6735
6749
|
"upsertRecords"
|
|
6736
|
-
]),
|
|
6750
|
+
]), xi = di([
|
|
6737
6751
|
"application",
|
|
6738
6752
|
"curatedDataset",
|
|
6739
6753
|
"database",
|
|
6740
6754
|
"fileStore"
|
|
6741
|
-
]),
|
|
6755
|
+
]), Si = /* @__PURE__ */ Q({ label: li }), Ci = di([
|
|
6742
6756
|
"bidirectional",
|
|
6743
6757
|
"destination",
|
|
6744
6758
|
"source"
|
|
6745
|
-
]),
|
|
6746
|
-
authMethodId:
|
|
6759
|
+
]), wi = /* @__PURE__ */ Q({ label: li }), Ti = /* @__PURE__ */ Q({
|
|
6760
|
+
authMethodId: di([
|
|
6747
6761
|
"apiKey",
|
|
6748
6762
|
"disabled",
|
|
6749
6763
|
"oAuth2",
|
|
6750
6764
|
"none"
|
|
6751
6765
|
]),
|
|
6752
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6753
|
-
canDescribe: /* @__PURE__ */
|
|
6754
|
-
id: /* @__PURE__ */
|
|
6755
|
-
label: /* @__PURE__ */
|
|
6756
|
-
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */
|
|
6757
|
-
params: /* @__PURE__ */
|
|
6758
|
-
}),
|
|
6759
|
-
...
|
|
6760
|
-
typeId: /* @__PURE__ */
|
|
6761
|
-
actionNames: /* @__PURE__ */
|
|
6762
|
-
category: /* @__PURE__ */ Z(
|
|
6763
|
-
categoryId:
|
|
6764
|
-
implementations: /* @__PURE__ */
|
|
6765
|
-
usage: /* @__PURE__ */ Z(
|
|
6766
|
-
usageId: /* @__PURE__ */ Z(
|
|
6767
|
-
}),
|
|
6766
|
+
activeConnectionCount: /* @__PURE__ */ ai(/* @__PURE__ */ ii()),
|
|
6767
|
+
canDescribe: /* @__PURE__ */ ai(/* @__PURE__ */ ni()),
|
|
6768
|
+
id: /* @__PURE__ */ ai(/* @__PURE__ */ $()),
|
|
6769
|
+
label: /* @__PURE__ */ ai(li),
|
|
6770
|
+
maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ ii()),
|
|
6771
|
+
params: /* @__PURE__ */ ai(/* @__PURE__ */ ti(/* @__PURE__ */ oi(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
|
|
6772
|
+
}), Ei = /* @__PURE__ */ Q({
|
|
6773
|
+
...yi,
|
|
6774
|
+
typeId: /* @__PURE__ */ ri("connector"),
|
|
6775
|
+
actionNames: /* @__PURE__ */ ti(bi),
|
|
6776
|
+
category: /* @__PURE__ */ Z(Si),
|
|
6777
|
+
categoryId: xi,
|
|
6778
|
+
implementations: /* @__PURE__ */ oi(/* @__PURE__ */ $(), Ti),
|
|
6779
|
+
usage: /* @__PURE__ */ Z(wi),
|
|
6780
|
+
usageId: /* @__PURE__ */ Z(Ci)
|
|
6781
|
+
}), Di = {
|
|
6768
6782
|
abortOperation: "Abort Operation",
|
|
6769
6783
|
auditObjectContent: "Audit Object Content",
|
|
6770
6784
|
createObject: "Create Object",
|
|
@@ -6780,12 +6794,12 @@ var yi = ui([
|
|
|
6780
6794
|
retrieveChunks: "Retrieve Chunks",
|
|
6781
6795
|
retrieveRecords: "Retrieve Records",
|
|
6782
6796
|
upsertRecords: "Upsert Records"
|
|
6783
|
-
},
|
|
6797
|
+
}, Oi = /* @__PURE__ */ new Set([
|
|
6784
6798
|
"createObject",
|
|
6785
6799
|
"dropObject",
|
|
6786
6800
|
"removeRecords",
|
|
6787
6801
|
"upsertRecords"
|
|
6788
|
-
]),
|
|
6802
|
+
]), ki = /* @__PURE__ */ new Set([
|
|
6789
6803
|
"auditObjectContent",
|
|
6790
6804
|
"findObject",
|
|
6791
6805
|
"getInfo",
|
|
@@ -6796,46 +6810,46 @@ var yi = ui([
|
|
|
6796
6810
|
"retrieveChunks",
|
|
6797
6811
|
"retrieveRecords"
|
|
6798
6812
|
]);
|
|
6799
|
-
function
|
|
6813
|
+
function Ai(e) {
|
|
6800
6814
|
let t = !1, n = !1;
|
|
6801
|
-
for (let r of e)
|
|
6815
|
+
for (let r of e) ki.has(r) && (t = !0), Oi.has(r) && (n = !0);
|
|
6802
6816
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "source";
|
|
6803
6817
|
}
|
|
6804
|
-
function
|
|
6818
|
+
function ji(e) {
|
|
6805
6819
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
6806
6820
|
n += "|:----|:-------:|\n";
|
|
6807
|
-
for (let e of Object.keys(
|
|
6821
|
+
for (let e of Object.keys(Di)) n += `| ${Di[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6808
6822
|
return n;
|
|
6809
6823
|
}
|
|
6810
6824
|
//#endregion
|
|
6811
6825
|
//#region src/actions/documentActions.ts
|
|
6812
|
-
var
|
|
6826
|
+
var Mi = "<!-- CONNECTOR_ACTIONS_START -->", Ni = "<!-- CONNECTOR_ACTIONS_END -->", Pi = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", Fi = {
|
|
6813
6827
|
source: "This connector is a Source connector that supports only read actions. Connectors can also function as a Destination (write-only) or Bidirectional (read/write), depending on the actions they support.",
|
|
6814
6828
|
destination: "This connector is a Destination connector that supports only write actions. Connectors can also function as a Source (read-only) or Bidirectional (read/write), depending on the actions they support.",
|
|
6815
6829
|
bidirectional: "This connector is a Bidirectional connector that supports both read and write actions. Connectors can also function as a Source (read-only) or Destination (write-only), depending on the actions they support."
|
|
6816
|
-
},
|
|
6817
|
-
async function
|
|
6830
|
+
}, Ii = "The table below lists all connector actions and highlights those supported by this connector.";
|
|
6831
|
+
async function Li() {
|
|
6818
6832
|
try {
|
|
6819
6833
|
K("Document Actions"), J("1️⃣ Insert actions description and table into 'README.md'");
|
|
6820
|
-
let e = (await W("config.json")).actionNames ?? [], t =
|
|
6821
|
-
await Bn("README.md", Gn(await G("./README.md"), r,
|
|
6834
|
+
let e = (await W("config.json")).actionNames ?? [], t = Ai(e), n = ji(e), r = `${Pi}\n\n${Fi[t]} ${Ii}\n\n${n}`;
|
|
6835
|
+
await Bn("README.md", Gn(await G("./README.md"), r, Mi, Ni)), q("Actions documented");
|
|
6822
6836
|
} catch (e) {
|
|
6823
6837
|
console.error("❌ Error documenting actions", e), process.exit(1);
|
|
6824
6838
|
}
|
|
6825
6839
|
}
|
|
6826
6840
|
//#endregion
|
|
6827
6841
|
//#region src/actions/documentOpening.ts
|
|
6828
|
-
var
|
|
6829
|
-
async function
|
|
6842
|
+
var Ri = "<!-- OPENING_START -->", zi = "<!-- OPENING_END -->";
|
|
6843
|
+
async function Bi() {
|
|
6830
6844
|
try {
|
|
6831
6845
|
K("Document Opening"), J("1️⃣ Insert opening content into 'README.md'");
|
|
6832
|
-
let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } =
|
|
6833
|
-
await Bn("README.md", Gn(await G("./README.md"), i,
|
|
6846
|
+
let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } = Vi(e), i = Wi(n, r, Hi(e), Ui(t));
|
|
6847
|
+
await Bn("README.md", Gn(await G("./README.md"), i, Ri, zi)), q("Opening documented");
|
|
6834
6848
|
} catch (e) {
|
|
6835
6849
|
console.error("❌ Error documenting opening", e), process.exit(1);
|
|
6836
6850
|
}
|
|
6837
6851
|
}
|
|
6838
|
-
function
|
|
6852
|
+
function Vi(e) {
|
|
6839
6853
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6840
6854
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document opening.");
|
|
6841
6855
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6845,17 +6859,17 @@ function Bi(e) {
|
|
|
6845
6859
|
repo: i[2]
|
|
6846
6860
|
};
|
|
6847
6861
|
}
|
|
6848
|
-
function
|
|
6862
|
+
function Hi(e) {
|
|
6849
6863
|
let t = e.license;
|
|
6850
6864
|
if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
|
|
6851
6865
|
return t;
|
|
6852
6866
|
}
|
|
6853
|
-
function
|
|
6867
|
+
function Ui(e) {
|
|
6854
6868
|
let t = e.description.en;
|
|
6855
6869
|
if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
|
|
6856
6870
|
return t;
|
|
6857
6871
|
}
|
|
6858
|
-
function
|
|
6872
|
+
function Wi(e, t, n, r) {
|
|
6859
6873
|
let i = `https://github.com/${e}/${t}`;
|
|
6860
6874
|
return `[}-blue.svg)](./LICENSE)
|
|
6861
6875
|
[](${i}/releases/latest)
|
|
@@ -6875,31 +6889,31 @@ ${r}`;
|
|
|
6875
6889
|
}
|
|
6876
6890
|
//#endregion
|
|
6877
6891
|
//#region src/actions/documentUsage.ts
|
|
6878
|
-
var
|
|
6879
|
-
async function
|
|
6892
|
+
var Gi = "<!-- USAGE_START -->", Ki = "<!-- USAGE_END -->";
|
|
6893
|
+
async function qi() {
|
|
6880
6894
|
try {
|
|
6881
6895
|
K("Document Usage"), J("1️⃣ Insert usage content into 'README.md'");
|
|
6882
|
-
let e = await W("package.json"), t =
|
|
6883
|
-
await Bn("README.md", Gn(await G("./README.md"), n,
|
|
6896
|
+
let e = await W("package.json"), t = Ji(e), n = Zi(t, Yi(t), Xi(e.engines?.node), Xi(e.engines?.npm), Xi(e.devDependencies?.typescript));
|
|
6897
|
+
await Bn("README.md", Gn(await G("./README.md"), n, Gi, Ki)), q("Usage documented");
|
|
6884
6898
|
} catch (e) {
|
|
6885
6899
|
console.error("❌ Error documenting usage", e), process.exit(1);
|
|
6886
6900
|
}
|
|
6887
6901
|
}
|
|
6888
|
-
function
|
|
6902
|
+
function Ji(e) {
|
|
6889
6903
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6890
6904
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
|
|
6891
6905
|
return n.replace(/^git\+/, "");
|
|
6892
6906
|
}
|
|
6893
|
-
function
|
|
6907
|
+
function Yi(e) {
|
|
6894
6908
|
return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
|
|
6895
6909
|
}
|
|
6896
|
-
function
|
|
6910
|
+
function Xi(e) {
|
|
6897
6911
|
if (e == null) throw Error("package.json version range is required to document usage.");
|
|
6898
6912
|
let t = /\d+(?:\.\d+)*/.exec(e);
|
|
6899
6913
|
if (t == null) throw Error(`Unable to parse version from '${e}'.`);
|
|
6900
6914
|
return t[0];
|
|
6901
6915
|
}
|
|
6902
|
-
function
|
|
6916
|
+
function Zi(e, t, n, r, i) {
|
|
6903
6917
|
return `This connector is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
|
|
6904
6918
|
|
|
6905
6919
|
You may view or clone this repository for your own purposes, such as building a new, similar connector, though there is currently no process to accept third-party connectors into DPUse at this stage. Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.
|
|
@@ -6914,9 +6928,9 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
|
|
|
6914
6928
|
}
|
|
6915
6929
|
//#endregion
|
|
6916
6930
|
//#region src/actions/formatCode.ts
|
|
6917
|
-
async function
|
|
6931
|
+
async function Qi() {
|
|
6918
6932
|
try {
|
|
6919
|
-
K("Format Code"), await
|
|
6933
|
+
K("Format Code"), await U("1️⃣ Format", "prettier", [
|
|
6920
6934
|
"--write",
|
|
6921
6935
|
"*.json",
|
|
6922
6936
|
"*.md",
|
|
@@ -6929,16 +6943,16 @@ async function Zi() {
|
|
|
6929
6943
|
}
|
|
6930
6944
|
//#endregion
|
|
6931
6945
|
//#region src/actions/lintCode.ts
|
|
6932
|
-
async function
|
|
6946
|
+
async function $i() {
|
|
6933
6947
|
try {
|
|
6934
|
-
K("Lint Code"), await
|
|
6948
|
+
K("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), q("Code linted");
|
|
6935
6949
|
} catch (e) {
|
|
6936
6950
|
console.error("❌ Error linting code", e), process.exit(1);
|
|
6937
6951
|
}
|
|
6938
6952
|
}
|
|
6939
6953
|
//#endregion
|
|
6940
6954
|
//#region src/utilities/cloudflare.ts
|
|
6941
|
-
async function
|
|
6955
|
+
async function ea() {
|
|
6942
6956
|
let e = await W("config.json"), t = {
|
|
6943
6957
|
body: JSON.stringify(e),
|
|
6944
6958
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6946,11 +6960,11 @@ async function $i() {
|
|
|
6946
6960
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6947
6961
|
if (!n.ok) throw Error(await n.text());
|
|
6948
6962
|
}
|
|
6949
|
-
async function
|
|
6963
|
+
async function ta(e, t) {
|
|
6950
6964
|
async function n(e, t, r) {
|
|
6951
6965
|
for (let i of r) {
|
|
6952
6966
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
6953
|
-
(await Hn(r)).isDirectory() ? await n(r, a, await
|
|
6967
|
+
(await Hn(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
|
|
6954
6968
|
"r2",
|
|
6955
6969
|
"object",
|
|
6956
6970
|
"put",
|
|
@@ -6961,10 +6975,10 @@ async function ea(e, t) {
|
|
|
6961
6975
|
]));
|
|
6962
6976
|
}
|
|
6963
6977
|
}
|
|
6964
|
-
let r = await
|
|
6978
|
+
let r = await Pn(`${e}/${t}/`);
|
|
6965
6979
|
await n(`${e}/${t}`, t, r);
|
|
6966
6980
|
}
|
|
6967
|
-
async function
|
|
6981
|
+
async function na(e) {
|
|
6968
6982
|
let t = e.id, n = {
|
|
6969
6983
|
body: JSON.stringify(e),
|
|
6970
6984
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6972,14 +6986,14 @@ async function ta(e) {
|
|
|
6972
6986
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6973
6987
|
if (!r.ok) throw Error(await r.text());
|
|
6974
6988
|
}
|
|
6975
|
-
async function
|
|
6989
|
+
async function ra(e, t) {
|
|
6976
6990
|
let n = `v${e.version ?? "unknown"}`;
|
|
6977
6991
|
async function r(e, r = "") {
|
|
6978
|
-
let i = await
|
|
6992
|
+
let i = await Pn(e, { withFileTypes: !0 });
|
|
6979
6993
|
for (let a of i) {
|
|
6980
6994
|
if (a.isDirectory() || a.name.endsWith(".map")) continue;
|
|
6981
6995
|
let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name, s = `${t}_${n}/${o}`.replaceAll("\\", "/"), c = a.name.endsWith(".css") ? "text/css" : "application/octet-stream", l = a.name.endsWith(".js") ? "application/javascript" : c;
|
|
6982
|
-
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await
|
|
6996
|
+
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await Fn(void 0, "wrangler", [
|
|
6983
6997
|
"r2",
|
|
6984
6998
|
"object",
|
|
6985
6999
|
"put",
|
|
@@ -6996,24 +7010,24 @@ async function na(e, t) {
|
|
|
6996
7010
|
}
|
|
6997
7011
|
//#endregion
|
|
6998
7012
|
//#region node_modules/valibot/dist/index.mjs
|
|
6999
|
-
var
|
|
7013
|
+
var ia = {
|
|
7000
7014
|
lang: void 0,
|
|
7001
7015
|
message: void 0,
|
|
7002
7016
|
abortEarly: void 0,
|
|
7003
7017
|
abortPipeEarly: void 0
|
|
7004
7018
|
};
|
|
7005
7019
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7006
|
-
function
|
|
7020
|
+
function aa(e) {
|
|
7007
7021
|
return e ? {
|
|
7008
7022
|
lang: e?.lang ?? void 0,
|
|
7009
7023
|
message: e?.message,
|
|
7010
7024
|
abortEarly: e?.abortEarly ?? void 0,
|
|
7011
7025
|
abortPipeEarly: e?.abortPipeEarly ?? void 0
|
|
7012
|
-
} :
|
|
7026
|
+
} : ia;
|
|
7013
7027
|
}
|
|
7014
7028
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7015
|
-
function
|
|
7016
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
7029
|
+
function oa(e, t, n) {
|
|
7030
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ aa(n));
|
|
7017
7031
|
return {
|
|
7018
7032
|
typed: r.typed,
|
|
7019
7033
|
success: !r.issues,
|
|
@@ -7023,77 +7037,77 @@ function aa(e, t, n) {
|
|
|
7023
7037
|
}
|
|
7024
7038
|
//#endregion
|
|
7025
7039
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
|
|
7026
|
-
var
|
|
7040
|
+
var sa = di([
|
|
7027
7041
|
"list",
|
|
7028
7042
|
"render",
|
|
7029
7043
|
"setColorMode"
|
|
7030
|
-
]),
|
|
7031
|
-
...
|
|
7032
|
-
typeId: /* @__PURE__ */
|
|
7033
|
-
actionNames: /* @__PURE__ */
|
|
7034
|
-
presentations: /* @__PURE__ */
|
|
7044
|
+
]), ca = /* @__PURE__ */ Q({
|
|
7045
|
+
...yi,
|
|
7046
|
+
typeId: /* @__PURE__ */ ri("presenter"),
|
|
7047
|
+
actionNames: /* @__PURE__ */ ti(sa),
|
|
7048
|
+
presentations: /* @__PURE__ */ ti(_i)
|
|
7035
7049
|
});
|
|
7036
7050
|
//#endregion
|
|
7037
7051
|
//#region src/actions/manageProject.ts
|
|
7038
|
-
async function
|
|
7052
|
+
async function la() {
|
|
7039
7053
|
try {
|
|
7040
|
-
K("Build Project"), await
|
|
7054
|
+
K("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
|
|
7041
7055
|
} catch (e) {
|
|
7042
7056
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7043
7057
|
}
|
|
7044
7058
|
}
|
|
7045
|
-
async function
|
|
7059
|
+
async function ua() {
|
|
7046
7060
|
try {
|
|
7047
7061
|
K("Publish Project");
|
|
7048
7062
|
let e = await W("package.json"), t = await W("config.json"), n = Vn(t.id);
|
|
7049
|
-
if (n.typeId === "app") J("1️⃣ Register module"), await
|
|
7050
|
-
else if (n.typeId === "engine") J("1️⃣ Register module"), await
|
|
7063
|
+
if (n.typeId === "app") J("1️⃣ Register module"), await ea();
|
|
7064
|
+
else if (n.typeId === "engine") J("1️⃣ Register module"), await ra(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await na(t);
|
|
7051
7065
|
else if (n.uploadGroupName === void 0) J("1️⃣ Publishing NOT required");
|
|
7052
7066
|
else {
|
|
7053
7067
|
J("1️⃣ Register module");
|
|
7054
7068
|
let r = t.id.split("-").slice(2).join("-");
|
|
7055
|
-
await
|
|
7069
|
+
await ra(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await na(t);
|
|
7056
7070
|
}
|
|
7057
7071
|
q(`Project version '${e.version ?? "unknown"}' published.`);
|
|
7058
7072
|
} catch (e) {
|
|
7059
7073
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7060
7074
|
}
|
|
7061
7075
|
}
|
|
7062
|
-
async function
|
|
7076
|
+
async function da() {
|
|
7063
7077
|
try {
|
|
7064
7078
|
K("Release Project");
|
|
7065
7079
|
let e = await W("package.json"), t = await W("config.json");
|
|
7066
|
-
await
|
|
7080
|
+
await va("1️⃣ ", e);
|
|
7067
7081
|
let n = Vn(t.id);
|
|
7068
7082
|
switch (n.typeId) {
|
|
7069
7083
|
case "connector":
|
|
7070
|
-
t = await
|
|
7084
|
+
t = await pa("2️⃣ ", e);
|
|
7071
7085
|
break;
|
|
7072
7086
|
case "presenter":
|
|
7073
|
-
t = await
|
|
7087
|
+
t = await ma("2️⃣ ", e);
|
|
7074
7088
|
break;
|
|
7075
|
-
default: t = await
|
|
7089
|
+
default: t = await fa("2️⃣ ", e);
|
|
7076
7090
|
}
|
|
7077
|
-
if (await
|
|
7091
|
+
if (await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7078
7092
|
"commit",
|
|
7079
7093
|
"-m",
|
|
7080
7094
|
`v${e.version ?? "unknown"}`
|
|
7081
|
-
]), await
|
|
7095
|
+
]), await Fn("6️⃣ Push changes", "git", [
|
|
7082
7096
|
"push",
|
|
7083
7097
|
"origin",
|
|
7084
7098
|
"main:main"
|
|
7085
|
-
]), n.typeId === "app") J("7️⃣ Register module"), await
|
|
7086
|
-
else if (n.typeId === "engine") J("7️⃣ Register module"), await
|
|
7099
|
+
]), n.typeId === "app") J("7️⃣ Register module"), await ea();
|
|
7100
|
+
else if (n.typeId === "engine") J("7️⃣ Register module"), await ra(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await na(t);
|
|
7087
7101
|
else if (n.uploadGroupName === void 0) J("7️⃣ Registration NOT required");
|
|
7088
7102
|
else {
|
|
7089
7103
|
J("7️⃣ Register module");
|
|
7090
7104
|
let r = t.id.split("-").slice(2).join("-");
|
|
7091
|
-
await
|
|
7105
|
+
await ra(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await na(t);
|
|
7092
7106
|
}
|
|
7093
7107
|
if (n.publishedTo === "npm") {
|
|
7094
7108
|
let e = ".npmrc";
|
|
7095
7109
|
try {
|
|
7096
|
-
await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await
|
|
7110
|
+
await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await U("8️⃣ Publish to npm", "npm", [
|
|
7097
7111
|
"publish",
|
|
7098
7112
|
"--access",
|
|
7099
7113
|
"public"
|
|
@@ -7107,45 +7121,45 @@ async function ua() {
|
|
|
7107
7121
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7108
7122
|
}
|
|
7109
7123
|
}
|
|
7110
|
-
async function
|
|
7124
|
+
async function fa(e, t) {
|
|
7111
7125
|
J(`${e} Build project configuration`);
|
|
7112
7126
|
let n = await W("config.json");
|
|
7113
7127
|
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Ln("logo.svg"), n.iconDark ??= await Ln("logoDark.svg"), await zn("config.json", n), n;
|
|
7114
7128
|
}
|
|
7115
|
-
async function
|
|
7129
|
+
async function pa(e, t) {
|
|
7116
7130
|
J(`${e} Build connector project configuration`);
|
|
7117
|
-
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */
|
|
7131
|
+
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ oa(Ei, n);
|
|
7118
7132
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7119
7133
|
let a = Un(r);
|
|
7120
|
-
return await
|
|
7134
|
+
return await ha(t, n, a, Ai(a));
|
|
7121
7135
|
}
|
|
7122
|
-
async function
|
|
7136
|
+
async function ma(e, t) {
|
|
7123
7137
|
J(`${e} Build presenter project configuration`);
|
|
7124
|
-
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */
|
|
7138
|
+
let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ oa(ca, n);
|
|
7125
7139
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7126
|
-
return await
|
|
7140
|
+
return await ha(t, n, Un(r));
|
|
7127
7141
|
}
|
|
7128
|
-
async function
|
|
7142
|
+
async function ha(e, t, n, r) {
|
|
7129
7143
|
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await zn("config.json", t), t;
|
|
7130
7144
|
}
|
|
7131
|
-
async function
|
|
7145
|
+
async function ga() {
|
|
7132
7146
|
try {
|
|
7133
7147
|
K("Synchronise Project with GitHub");
|
|
7134
7148
|
let e = await W("package.json"), t = await W("config.json");
|
|
7135
|
-
switch (await
|
|
7149
|
+
switch (await va("1️⃣ ", e), Vn(t.id).typeId) {
|
|
7136
7150
|
case "connector":
|
|
7137
|
-
await
|
|
7151
|
+
await pa("2️⃣ ", e);
|
|
7138
7152
|
break;
|
|
7139
7153
|
case "presenter":
|
|
7140
|
-
await
|
|
7154
|
+
await ma("2️⃣ ", e);
|
|
7141
7155
|
break;
|
|
7142
|
-
default: await
|
|
7156
|
+
default: await fa("2️⃣ ", e);
|
|
7143
7157
|
}
|
|
7144
|
-
await
|
|
7158
|
+
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7145
7159
|
"commit",
|
|
7146
7160
|
"-m",
|
|
7147
7161
|
`v${e.version ?? "unknown"}`
|
|
7148
|
-
]), await
|
|
7162
|
+
]), await Fn("5️⃣ Push changes", "git", [
|
|
7149
7163
|
"push",
|
|
7150
7164
|
"origin",
|
|
7151
7165
|
"main:main"
|
|
@@ -7154,14 +7168,14 @@ async function ha() {
|
|
|
7154
7168
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7155
7169
|
}
|
|
7156
7170
|
}
|
|
7157
|
-
function
|
|
7171
|
+
function _a() {
|
|
7158
7172
|
try {
|
|
7159
7173
|
K("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
7160
7174
|
} catch (e) {
|
|
7161
7175
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7162
7176
|
}
|
|
7163
7177
|
}
|
|
7164
|
-
async function
|
|
7178
|
+
async function va(e, t, n = "./") {
|
|
7165
7179
|
if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7166
7180
|
else {
|
|
7167
7181
|
let e = t.version, n = t.version.split(".");
|
|
@@ -7170,6 +7184,6 @@ async function _a(e, t, n = "./") {
|
|
|
7170
7184
|
await zn(`${n}package.json`, t);
|
|
7171
7185
|
}
|
|
7172
7186
|
//#endregion
|
|
7173
|
-
export { Kn as auditDependencies,
|
|
7187
|
+
export { Kn as auditDependencies, la as buildProject, qn as checkConfigFiles, $n as checkDependencies, Li as documentActions, or as documentBundleSizes, Or as documentDependencies, Vr as documentGovernance, Bi as documentOpening, qi as documentUsage, Qi as formatCode, $i as lintCode, ua as publishProject, da as releaseProject, ga as syncProjectWithGitHub, _a as testProject, ta as uploadDirectoryToR2 };
|
|
7174
7188
|
|
|
7175
7189
|
//# sourceMappingURL=dpuse-development.es.js.map
|