@dpuse/dpuse-development 0.3.686 → 0.3.688
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 +2 -2
- package/dist/dpuse-development.es.js +664 -654
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +4 -4
|
@@ -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,
|
|
@@ -2430,15 +2430,15 @@ kt.prototype.separatedFrom = function(e) {
|
|
|
2430
2430
|
}, kt.prototype.sibling = function() {
|
|
2431
2431
|
return new kt(this.parent, this.base);
|
|
2432
2432
|
};
|
|
2433
|
-
var
|
|
2433
|
+
var At = function(e) {
|
|
2434
2434
|
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;
|
|
2435
2435
|
};
|
|
2436
|
-
|
|
2436
|
+
At.prototype.reset = function(e, t, n) {
|
|
2437
2437
|
var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
|
|
2438
2438
|
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);
|
|
2439
|
-
},
|
|
2439
|
+
}, At.prototype.raise = function(e) {
|
|
2440
2440
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
2441
|
-
},
|
|
2441
|
+
}, At.prototype.at = function(e, t) {
|
|
2442
2442
|
t === void 0 && (t = !1);
|
|
2443
2443
|
var n = this.source, r = n.length;
|
|
2444
2444
|
if (e >= r) return -1;
|
|
@@ -2446,21 +2446,21 @@ R.prototype.reset = function(e, t, n) {
|
|
|
2446
2446
|
if (!(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r) return i;
|
|
2447
2447
|
var a = n.charCodeAt(e + 1);
|
|
2448
2448
|
return a >= 56320 && a <= 57343 ? (i << 10) + a - 56613888 : i;
|
|
2449
|
-
},
|
|
2449
|
+
}, At.prototype.nextIndex = 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 r;
|
|
2453
2453
|
var i = n.charCodeAt(e), a;
|
|
2454
2454
|
return !(t || this.switchU) || i <= 55295 || i >= 57344 || e + 1 >= r || (a = n.charCodeAt(e + 1)) < 56320 || a > 57343 ? e + 1 : e + 2;
|
|
2455
|
-
},
|
|
2455
|
+
}, At.prototype.current = function(e) {
|
|
2456
2456
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
2457
|
-
},
|
|
2457
|
+
}, At.prototype.lookahead = function(e) {
|
|
2458
2458
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
2459
|
-
},
|
|
2459
|
+
}, At.prototype.advance = function(e) {
|
|
2460
2460
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
2461
|
-
},
|
|
2461
|
+
}, At.prototype.eat = function(e, t) {
|
|
2462
2462
|
return t === void 0 && (t = !1), this.current(t) === e ? (this.advance(t), !0) : !1;
|
|
2463
|
-
},
|
|
2463
|
+
}, At.prototype.eatChars = function(e, t) {
|
|
2464
2464
|
t === void 0 && (t = !1);
|
|
2465
2465
|
for (var n = this.pos, r = 0, i = e; r < i.length; r += 1) {
|
|
2466
2466
|
var a = i[r], o = this.at(n, t);
|
|
@@ -2475,12 +2475,12 @@ R.prototype.reset = function(e, t, n) {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
|
|
2477
2477
|
};
|
|
2478
|
-
function
|
|
2478
|
+
function jt(e) {
|
|
2479
2479
|
for (var t in e) return !0;
|
|
2480
2480
|
return !1;
|
|
2481
2481
|
}
|
|
2482
2482
|
L.validateRegExpPattern = function(e) {
|
|
2483
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
2483
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && jt(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2484
2484
|
}, L.regexp_pattern = function(e) {
|
|
2485
2485
|
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");
|
|
2486
2486
|
for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
|
|
@@ -2564,10 +2564,10 @@ L.validateRegExpPattern = function(e) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
return !1;
|
|
2566
2566
|
}, L.regexp_eatModifiers = function(e) {
|
|
2567
|
-
for (var t = "", n = 0; (n = e.current()) !== -1 &&
|
|
2567
|
+
for (var t = "", n = 0; (n = e.current()) !== -1 && Mt(n);) t += he(n), e.advance();
|
|
2568
2568
|
return t;
|
|
2569
2569
|
};
|
|
2570
|
-
function
|
|
2570
|
+
function Mt(e) {
|
|
2571
2571
|
return e === 105 || e === 109 || e === 115;
|
|
2572
2572
|
}
|
|
2573
2573
|
L.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2576,13 +2576,13 @@ L.regexp_eatExtendedAtom = function(e) {
|
|
|
2576
2576
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2577
2577
|
}, L.regexp_eatSyntaxCharacter = function(e) {
|
|
2578
2578
|
var t = e.current();
|
|
2579
|
-
return
|
|
2579
|
+
return Nt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2580
2580
|
};
|
|
2581
|
-
function
|
|
2581
|
+
function Nt(e) {
|
|
2582
2582
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2583
2583
|
}
|
|
2584
2584
|
L.regexp_eatPatternCharacters = function(e) {
|
|
2585
|
-
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !
|
|
2585
|
+
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !Nt(n);) e.advance();
|
|
2586
2586
|
return e.pos !== t;
|
|
2587
2587
|
}, L.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2588
2588
|
var t = e.current();
|
|
@@ -2609,16 +2609,16 @@ L.regexp_eatPatternCharacters = function(e) {
|
|
|
2609
2609
|
return !1;
|
|
2610
2610
|
}, L.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2611
2611
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2612
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2612
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Pt(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2613
2613
|
};
|
|
2614
|
-
function
|
|
2614
|
+
function Pt(e) {
|
|
2615
2615
|
return y(e, !0) || e === 36 || e === 95;
|
|
2616
2616
|
}
|
|
2617
2617
|
L.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2618
2618
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2619
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2619
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Ft(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2620
2620
|
};
|
|
2621
|
-
function
|
|
2621
|
+
function Ft(e) {
|
|
2622
2622
|
return b(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2623
2623
|
}
|
|
2624
2624
|
L.regexp_eatAtomEscape = function(e) {
|
|
@@ -2648,15 +2648,15 @@ L.regexp_eatAtomEscape = function(e) {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
return !1;
|
|
2650
2650
|
}, L.regexp_eatZero = function(e) {
|
|
2651
|
-
return e.current() === 48 && !
|
|
2651
|
+
return e.current() === 48 && !Kt(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2652
2652
|
}, L.regexp_eatControlEscape = function(e) {
|
|
2653
2653
|
var t = e.current();
|
|
2654
2654
|
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) : !1;
|
|
2655
2655
|
}, L.regexp_eatControlLetter = function(e) {
|
|
2656
2656
|
var t = e.current();
|
|
2657
|
-
return
|
|
2657
|
+
return It(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2658
2658
|
};
|
|
2659
|
-
function
|
|
2659
|
+
function It(e) {
|
|
2660
2660
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2661
2661
|
}
|
|
2662
2662
|
L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2675,12 +2675,12 @@ L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
return !0;
|
|
2677
2677
|
}
|
|
2678
|
-
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
2678
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && Lt(e.lastIntValue)) return !0;
|
|
2679
2679
|
r && e.raise("Invalid unicode escape"), e.pos = n;
|
|
2680
2680
|
}
|
|
2681
2681
|
return !1;
|
|
2682
2682
|
};
|
|
2683
|
-
function
|
|
2683
|
+
function Lt(e) {
|
|
2684
2684
|
return e >= 0 && e <= 1114111;
|
|
2685
2685
|
}
|
|
2686
2686
|
L.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2698,20 +2698,20 @@ L.regexp_eatIdentityEscape = function(e) {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
return !1;
|
|
2700
2700
|
};
|
|
2701
|
-
var
|
|
2701
|
+
var Rt = 0, zt = 1, R = 2;
|
|
2702
2702
|
L.regexp_eatCharacterClassEscape = function(e) {
|
|
2703
2703
|
var t = e.current();
|
|
2704
|
-
if (
|
|
2704
|
+
if (Bt(t)) return e.lastIntValue = -1, e.advance(), zt;
|
|
2705
2705
|
var n = !1;
|
|
2706
2706
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
|
|
2707
2707
|
e.lastIntValue = -1, e.advance();
|
|
2708
2708
|
var r;
|
|
2709
|
-
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r ===
|
|
2709
|
+
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === R && e.raise("Invalid property name"), r;
|
|
2710
2710
|
e.raise("Invalid property name");
|
|
2711
2711
|
}
|
|
2712
|
-
return
|
|
2712
|
+
return Rt;
|
|
2713
2713
|
};
|
|
2714
|
-
function
|
|
2714
|
+
function Bt(e) {
|
|
2715
2715
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2716
2716
|
}
|
|
2717
2717
|
L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -2720,46 +2720,46 @@ L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2720
2720
|
var n = e.lastStringValue;
|
|
2721
2721
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2722
2722
|
var r = e.lastStringValue;
|
|
2723
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r),
|
|
2723
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), zt;
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
2726
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2727
2727
|
var i = e.lastStringValue;
|
|
2728
2728
|
return this.regexp_validateUnicodePropertyNameOrValue(e, i);
|
|
2729
2729
|
}
|
|
2730
|
-
return
|
|
2730
|
+
return Rt;
|
|
2731
2731
|
}, L.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
|
|
2732
2732
|
de(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
|
|
2733
2733
|
}, L.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2734
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
2735
|
-
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return
|
|
2734
|
+
if (e.unicodeProperties.binary.test(t)) return zt;
|
|
2735
|
+
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return R;
|
|
2736
2736
|
e.raise("Invalid property name");
|
|
2737
2737
|
}, L.regexp_eatUnicodePropertyName = function(e) {
|
|
2738
2738
|
var t = 0;
|
|
2739
|
-
for (e.lastStringValue = "";
|
|
2739
|
+
for (e.lastStringValue = ""; Vt(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2740
2740
|
return e.lastStringValue !== "";
|
|
2741
2741
|
};
|
|
2742
|
-
function
|
|
2743
|
-
return
|
|
2742
|
+
function Vt(e) {
|
|
2743
|
+
return It(e) || e === 95;
|
|
2744
2744
|
}
|
|
2745
2745
|
L.regexp_eatUnicodePropertyValue = function(e) {
|
|
2746
2746
|
var t = 0;
|
|
2747
|
-
for (e.lastStringValue = "";
|
|
2747
|
+
for (e.lastStringValue = ""; Ht(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2748
2748
|
return e.lastStringValue !== "";
|
|
2749
2749
|
};
|
|
2750
|
-
function
|
|
2751
|
-
return
|
|
2750
|
+
function Ht(e) {
|
|
2751
|
+
return Vt(e) || Kt(e);
|
|
2752
2752
|
}
|
|
2753
2753
|
L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2754
2754
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
2755
2755
|
}, L.regexp_eatCharacterClass = function(e) {
|
|
2756
2756
|
if (e.eat(91)) {
|
|
2757
2757
|
var t = e.eat(94), n = this.regexp_classContents(e);
|
|
2758
|
-
return e.eat(93) || e.raise("Unterminated character class"), t && n ===
|
|
2758
|
+
return e.eat(93) || e.raise("Unterminated character class"), t && n === R && e.raise("Negated character class may contain strings"), !0;
|
|
2759
2759
|
}
|
|
2760
2760
|
return !1;
|
|
2761
2761
|
}, L.regexp_classContents = function(e) {
|
|
2762
|
-
return e.current() === 93 ?
|
|
2762
|
+
return e.current() === 93 ? zt : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), zt);
|
|
2763
2763
|
}, L.regexp_nonEmptyClassRanges = function(e) {
|
|
2764
2764
|
for (; this.regexp_eatClassAtom(e);) {
|
|
2765
2765
|
var t = e.lastIntValue;
|
|
@@ -2774,7 +2774,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2774
2774
|
if (this.regexp_eatClassEscape(e)) return !0;
|
|
2775
2775
|
if (e.switchU) {
|
|
2776
2776
|
var n = e.current();
|
|
2777
|
-
(n === 99 ||
|
|
2777
|
+
(n === 99 || Yt(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2778
2778
|
}
|
|
2779
2779
|
e.pos = t;
|
|
2780
2780
|
}
|
|
@@ -2790,12 +2790,12 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2792
2792
|
}, L.regexp_classSetExpression = function(e) {
|
|
2793
|
-
var t =
|
|
2793
|
+
var t = zt, n;
|
|
2794
2794
|
if (!this.regexp_eatClassSetRange(e)) if (n = this.regexp_eatClassSetOperand(e)) {
|
|
2795
|
-
n ===
|
|
2795
|
+
n === R && (t = R);
|
|
2796
2796
|
for (var r = e.pos; e.eatChars([38, 38]);) {
|
|
2797
2797
|
if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
|
|
2798
|
-
n !==
|
|
2798
|
+
n !== R && (t = zt);
|
|
2799
2799
|
continue;
|
|
2800
2800
|
}
|
|
2801
2801
|
e.raise("Invalid character in character class");
|
|
@@ -2806,7 +2806,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2806
2806
|
} else e.raise("Invalid character in character class");
|
|
2807
2807
|
for (;;) if (!this.regexp_eatClassSetRange(e)) {
|
|
2808
2808
|
if (n = this.regexp_eatClassSetOperand(e), !n) return t;
|
|
2809
|
-
n ===
|
|
2809
|
+
n === R && (t = R);
|
|
2810
2810
|
}
|
|
2811
2811
|
}, L.regexp_eatClassSetRange = function(e) {
|
|
2812
2812
|
var t = e.pos;
|
|
@@ -2820,12 +2820,12 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
return !1;
|
|
2822
2822
|
}, L.regexp_eatClassSetOperand = function(e) {
|
|
2823
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2823
|
+
return this.regexp_eatClassSetCharacter(e) ? zt : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2824
2824
|
}, L.regexp_eatNestedClass = function(e) {
|
|
2825
2825
|
var t = e.pos;
|
|
2826
2826
|
if (e.eat(91)) {
|
|
2827
2827
|
var n = e.eat(94), r = this.regexp_classContents(e);
|
|
2828
|
-
if (e.eat(93)) return n && r ===
|
|
2828
|
+
if (e.eat(93)) return n && r === R && e.raise("Negated character class may contain strings"), r;
|
|
2829
2829
|
e.pos = t;
|
|
2830
2830
|
}
|
|
2831
2831
|
if (e.eat(92)) {
|
|
@@ -2845,33 +2845,33 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2845
2845
|
}
|
|
2846
2846
|
return null;
|
|
2847
2847
|
}, L.regexp_classStringDisjunctionContents = function(e) {
|
|
2848
|
-
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) ===
|
|
2848
|
+
for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === R && (t = R);
|
|
2849
2849
|
return t;
|
|
2850
2850
|
}, L.regexp_classString = function(e) {
|
|
2851
2851
|
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
2852
|
-
return t === 1 ?
|
|
2852
|
+
return t === 1 ? zt : R;
|
|
2853
2853
|
}, L.regexp_eatClassSetCharacter = function(e) {
|
|
2854
2854
|
var t = e.pos;
|
|
2855
2855
|
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);
|
|
2856
2856
|
var n = e.current();
|
|
2857
|
-
return n < 0 || n === e.lookahead() &&
|
|
2857
|
+
return n < 0 || n === e.lookahead() && Ut(n) || Wt(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
|
|
2858
2858
|
};
|
|
2859
|
-
function
|
|
2859
|
+
function Ut(e) {
|
|
2860
2860
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function Wt(e) {
|
|
2863
2863
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2864
2864
|
}
|
|
2865
2865
|
L.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2866
2866
|
var t = e.current();
|
|
2867
|
-
return
|
|
2867
|
+
return Gt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2868
2868
|
};
|
|
2869
|
-
function
|
|
2869
|
+
function Gt(e) {
|
|
2870
2870
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2871
2871
|
}
|
|
2872
2872
|
L.regexp_eatClassControlLetter = function(e) {
|
|
2873
2873
|
var t = e.current();
|
|
2874
|
-
return
|
|
2874
|
+
return Kt(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2875
2875
|
}, L.regexp_eatHexEscapeSequence = function(e) {
|
|
2876
2876
|
var t = e.pos;
|
|
2877
2877
|
if (e.eat(120)) {
|
|
@@ -2881,21 +2881,21 @@ L.regexp_eatClassControlLetter = function(e) {
|
|
|
2881
2881
|
return !1;
|
|
2882
2882
|
}, L.regexp_eatDecimalDigits = function(e) {
|
|
2883
2883
|
var t = e.pos, n = 0;
|
|
2884
|
-
for (e.lastIntValue = 0;
|
|
2884
|
+
for (e.lastIntValue = 0; Kt(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
|
|
2885
2885
|
return e.pos !== t;
|
|
2886
2886
|
};
|
|
2887
|
-
function
|
|
2887
|
+
function Kt(e) {
|
|
2888
2888
|
return e >= 48 && e <= 57;
|
|
2889
2889
|
}
|
|
2890
2890
|
L.regexp_eatHexDigits = function(e) {
|
|
2891
2891
|
var t = e.pos, n = 0;
|
|
2892
|
-
for (e.lastIntValue = 0;
|
|
2892
|
+
for (e.lastIntValue = 0; qt(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + Jt(n), e.advance();
|
|
2893
2893
|
return e.pos !== t;
|
|
2894
2894
|
};
|
|
2895
|
-
function
|
|
2895
|
+
function qt(e) {
|
|
2896
2896
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2898
|
+
function Jt(e) {
|
|
2899
2899
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2900
2900
|
}
|
|
2901
2901
|
L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -2910,9 +2910,9 @@ L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2910
2910
|
return !1;
|
|
2911
2911
|
}, L.regexp_eatOctalDigit = function(e) {
|
|
2912
2912
|
var t = e.current();
|
|
2913
|
-
return
|
|
2913
|
+
return Yt(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2914
2914
|
};
|
|
2915
|
-
function
|
|
2915
|
+
function Yt(e) {
|
|
2916
2916
|
return e >= 48 && e <= 55;
|
|
2917
2917
|
}
|
|
2918
2918
|
L.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -2920,19 +2920,19 @@ L.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
2920
2920
|
e.lastIntValue = 0;
|
|
2921
2921
|
for (var r = 0; r < t; ++r) {
|
|
2922
2922
|
var i = e.current();
|
|
2923
|
-
if (!
|
|
2924
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2923
|
+
if (!qt(i)) return e.pos = n, !1;
|
|
2924
|
+
e.lastIntValue = 16 * e.lastIntValue + Jt(i), e.advance();
|
|
2925
2925
|
}
|
|
2926
2926
|
return !0;
|
|
2927
2927
|
};
|
|
2928
|
-
var
|
|
2928
|
+
var Xt = function(e) {
|
|
2929
2929
|
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]);
|
|
2930
|
-
},
|
|
2931
|
-
|
|
2932
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2933
|
-
},
|
|
2934
|
-
return this.next(), new
|
|
2935
|
-
}, typeof Symbol < "u" && (
|
|
2930
|
+
}, z = k.prototype;
|
|
2931
|
+
z.next = function(e) {
|
|
2932
|
+
!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();
|
|
2933
|
+
}, z.getToken = function() {
|
|
2934
|
+
return this.next(), new Xt(this);
|
|
2935
|
+
}, typeof Symbol < "u" && (z[Symbol.iterator] = function() {
|
|
2936
2936
|
var e = this;
|
|
2937
2937
|
return { next: function() {
|
|
2938
2938
|
var t = e.getToken();
|
|
@@ -2941,28 +2941,28 @@ B.next = function(e) {
|
|
|
2941
2941
|
value: t
|
|
2942
2942
|
};
|
|
2943
2943
|
} };
|
|
2944
|
-
}),
|
|
2944
|
+
}), z.nextToken = function() {
|
|
2945
2945
|
var e = this.curContext();
|
|
2946
2946
|
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);
|
|
2947
2947
|
if (e.override) return e.override(this);
|
|
2948
2948
|
this.readToken(this.fullCharCodeAtPos());
|
|
2949
|
-
},
|
|
2949
|
+
}, z.readToken = function(e) {
|
|
2950
2950
|
return y(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e);
|
|
2951
|
-
},
|
|
2951
|
+
}, z.fullCharCodeAt = function(e) {
|
|
2952
2952
|
var t = this.input.charCodeAt(e);
|
|
2953
2953
|
if (t <= 55295 || t >= 56320) return t;
|
|
2954
2954
|
var n = this.input.charCodeAt(e + 1);
|
|
2955
2955
|
return n <= 56319 || n >= 57344 ? t : (t << 10) + n - 56613888;
|
|
2956
|
-
},
|
|
2956
|
+
}, z.fullCharCodeAtPos = function() {
|
|
2957
2957
|
return this.fullCharCodeAt(this.pos);
|
|
2958
|
-
},
|
|
2958
|
+
}, z.skipBlockComment = function() {
|
|
2959
2959
|
var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
2960
2960
|
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;
|
|
2961
2961
|
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
2962
|
-
},
|
|
2962
|
+
}, z.skipLineComment = function(e) {
|
|
2963
2963
|
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);
|
|
2964
2964
|
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
|
|
2965
|
-
},
|
|
2965
|
+
}, z.skipSpace = function() {
|
|
2966
2966
|
loop: for (; this.pos < this.input.length;) {
|
|
2967
2967
|
var e = this.input.charCodeAt(this.pos);
|
|
2968
2968
|
switch (e) {
|
|
@@ -2991,36 +2991,36 @@ B.next = function(e) {
|
|
|
2991
2991
|
else break loop;
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
|
-
},
|
|
2994
|
+
}, z.finishToken = function(e, t) {
|
|
2995
2995
|
this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
2996
2996
|
var n = this.type;
|
|
2997
2997
|
this.type = e, this.value = t, this.updateContext(n);
|
|
2998
|
-
},
|
|
2998
|
+
}, z.readToken_dot = function() {
|
|
2999
2999
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3000
3000
|
if (e >= 48 && e <= 57) return this.readNumber(!0);
|
|
3001
3001
|
var t = this.input.charCodeAt(this.pos + 2);
|
|
3002
3002
|
return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(E.ellipsis)) : (++this.pos, this.finishToken(E.dot));
|
|
3003
|
-
},
|
|
3003
|
+
}, z.readToken_slash = function() {
|
|
3004
3004
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
3005
3005
|
return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(E.assign, 2) : this.finishOp(E.slash, 1);
|
|
3006
|
-
},
|
|
3006
|
+
}, z.readToken_mult_modulo_exp = function(e) {
|
|
3007
3007
|
var t = this.input.charCodeAt(this.pos + 1), n = 1, r = e === 42 ? E.star : E.modulo;
|
|
3008
3008
|
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);
|
|
3009
|
-
},
|
|
3009
|
+
}, z.readToken_pipe_amp = function(e) {
|
|
3010
3010
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3011
3011
|
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);
|
|
3012
|
-
},
|
|
3012
|
+
}, z.readToken_caret = function() {
|
|
3013
3013
|
return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(E.assign, 2) : this.finishOp(E.bitwiseXOR, 1);
|
|
3014
|
-
},
|
|
3014
|
+
}, z.readToken_plus_min = function(e) {
|
|
3015
3015
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3016
3016
|
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);
|
|
3017
|
-
},
|
|
3017
|
+
}, z.readToken_lt_gt = function(e) {
|
|
3018
3018
|
var t = this.input.charCodeAt(this.pos + 1), n = 1;
|
|
3019
3019
|
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));
|
|
3020
|
-
},
|
|
3020
|
+
}, z.readToken_eq_excl = function(e) {
|
|
3021
3021
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
3022
3022
|
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);
|
|
3023
|
-
},
|
|
3023
|
+
}, z.readToken_question = function() {
|
|
3024
3024
|
var e = this.options.ecmaVersion;
|
|
3025
3025
|
if (e >= 11) {
|
|
3026
3026
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
@@ -3031,11 +3031,11 @@ B.next = function(e) {
|
|
|
3031
3031
|
if (t === 63) return e >= 12 && this.input.charCodeAt(this.pos + 2) === 61 ? this.finishOp(E.assign, 3) : this.finishOp(E.coalesce, 2);
|
|
3032
3032
|
}
|
|
3033
3033
|
return this.finishOp(E.question, 1);
|
|
3034
|
-
},
|
|
3034
|
+
}, z.readToken_numberSign = function() {
|
|
3035
3035
|
var e = this.options.ecmaVersion, t = 35;
|
|
3036
3036
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), y(t, !0) || t === 92)) return this.finishToken(E.privateId, this.readWord1());
|
|
3037
3037
|
this.raise(this.pos, "Unexpected character '" + he(t) + "'");
|
|
3038
|
-
},
|
|
3038
|
+
}, z.getTokenFromCode = function(e) {
|
|
3039
3039
|
switch (e) {
|
|
3040
3040
|
case 46: return this.readToken_dot();
|
|
3041
3041
|
case 40: return ++this.pos, this.finishToken(E.parenL);
|
|
@@ -3085,10 +3085,10 @@ B.next = function(e) {
|
|
|
3085
3085
|
case 35: return this.readToken_numberSign();
|
|
3086
3086
|
}
|
|
3087
3087
|
this.raise(this.pos, "Unexpected character '" + he(e) + "'");
|
|
3088
|
-
},
|
|
3088
|
+
}, z.finishOp = function(e, t) {
|
|
3089
3089
|
var n = this.input.slice(this.pos, this.pos + t);
|
|
3090
3090
|
return this.pos += t, this.finishToken(e, n);
|
|
3091
|
-
},
|
|
3091
|
+
}, z.readRegexp = function() {
|
|
3092
3092
|
for (var e, t, n = this.pos;;) {
|
|
3093
3093
|
this.pos >= this.input.length && this.raise(n, "Unterminated regular expression");
|
|
3094
3094
|
var r = this.input.charAt(this.pos);
|
|
@@ -3105,7 +3105,7 @@ B.next = function(e) {
|
|
|
3105
3105
|
++this.pos;
|
|
3106
3106
|
var a = this.pos, o = this.readWord1();
|
|
3107
3107
|
this.containsEsc && this.unexpected(a);
|
|
3108
|
-
var s = this.regexpState ||= new
|
|
3108
|
+
var s = this.regexpState ||= new At(this);
|
|
3109
3109
|
s.reset(n, i, o), this.validateRegExpFlags(s), this.validateRegExpPattern(s);
|
|
3110
3110
|
var c = null;
|
|
3111
3111
|
try {
|
|
@@ -3116,7 +3116,7 @@ B.next = function(e) {
|
|
|
3116
3116
|
flags: o,
|
|
3117
3117
|
value: c
|
|
3118
3118
|
});
|
|
3119
|
-
},
|
|
3119
|
+
}, z.readInt = function(e, t, n) {
|
|
3120
3120
|
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) {
|
|
3121
3121
|
var u = this.input.charCodeAt(this.pos), d = void 0;
|
|
3122
3122
|
if (r && u === 95) {
|
|
@@ -3128,31 +3128,31 @@ B.next = function(e) {
|
|
|
3128
3128
|
}
|
|
3129
3129
|
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;
|
|
3130
3130
|
};
|
|
3131
|
-
function
|
|
3131
|
+
function Zt(e, t) {
|
|
3132
3132
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3133
3133
|
}
|
|
3134
|
-
function
|
|
3134
|
+
function Qt(e) {
|
|
3135
3135
|
return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
|
|
3136
3136
|
}
|
|
3137
|
-
|
|
3137
|
+
z.readRadixNumber = function(e) {
|
|
3138
3138
|
var t = this.pos;
|
|
3139
3139
|
this.pos += 2;
|
|
3140
3140
|
var n = this.readInt(e);
|
|
3141
|
-
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n =
|
|
3142
|
-
},
|
|
3141
|
+
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);
|
|
3142
|
+
}, z.readNumber = function(e) {
|
|
3143
3143
|
var t = this.pos;
|
|
3144
3144
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
3145
3145
|
var n = this.pos - t >= 2 && this.input.charCodeAt(t) === 48;
|
|
3146
3146
|
n && this.strict && this.raise(t, "Invalid number");
|
|
3147
3147
|
var r = this.input.charCodeAt(this.pos);
|
|
3148
3148
|
if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3149
|
-
var i =
|
|
3149
|
+
var i = Qt(this.input.slice(t, this.pos));
|
|
3150
3150
|
return ++this.pos, y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(E.num, i);
|
|
3151
3151
|
}
|
|
3152
3152
|
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");
|
|
3153
|
-
var a =
|
|
3153
|
+
var a = Zt(this.input.slice(t, this.pos), n);
|
|
3154
3154
|
return this.finishToken(E.num, a);
|
|
3155
|
-
},
|
|
3155
|
+
}, z.readCodePoint = function() {
|
|
3156
3156
|
var e = this.input.charCodeAt(this.pos), t;
|
|
3157
3157
|
if (e === 123) {
|
|
3158
3158
|
this.options.ecmaVersion < 6 && this.unexpected();
|
|
@@ -3160,7 +3160,7 @@ B.readRadixNumber = function(e) {
|
|
|
3160
3160
|
t = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, t > 1114111 && this.invalidStringToken(n, "Code point out of bounds");
|
|
3161
3161
|
} else t = this.readHexChar(4);
|
|
3162
3162
|
return t;
|
|
3163
|
-
},
|
|
3163
|
+
}, z.readString = function(e) {
|
|
3164
3164
|
for (var t = "", n = ++this.pos;;) {
|
|
3165
3165
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3166
3166
|
var r = this.input.charCodeAt(this.pos);
|
|
@@ -3169,20 +3169,20 @@ B.readRadixNumber = function(e) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
return t += this.input.slice(n, this.pos++), this.finishToken(E.string, t);
|
|
3171
3171
|
};
|
|
3172
|
-
var
|
|
3173
|
-
|
|
3172
|
+
var $t = {};
|
|
3173
|
+
z.tryReadTemplateToken = function() {
|
|
3174
3174
|
this.inTemplateElement = !0;
|
|
3175
3175
|
try {
|
|
3176
3176
|
this.readTmplToken();
|
|
3177
3177
|
} catch (e) {
|
|
3178
|
-
if (e ===
|
|
3178
|
+
if (e === $t) this.readInvalidTemplateToken();
|
|
3179
3179
|
else throw e;
|
|
3180
3180
|
}
|
|
3181
3181
|
this.inTemplateElement = !1;
|
|
3182
|
-
},
|
|
3183
|
-
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw
|
|
3182
|
+
}, z.invalidStringToken = function(e, t) {
|
|
3183
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw $t;
|
|
3184
3184
|
this.raise(e, t);
|
|
3185
|
-
},
|
|
3185
|
+
}, z.readTmplToken = function() {
|
|
3186
3186
|
for (var e = "", t = this.pos;;) {
|
|
3187
3187
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
|
|
3188
3188
|
var n = this.input.charCodeAt(this.pos);
|
|
@@ -3201,7 +3201,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3201
3201
|
this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos;
|
|
3202
3202
|
} else ++this.pos;
|
|
3203
3203
|
}
|
|
3204
|
-
},
|
|
3204
|
+
}, z.readInvalidTemplateToken = function() {
|
|
3205
3205
|
for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) {
|
|
3206
3206
|
case "\\":
|
|
3207
3207
|
++this.pos;
|
|
@@ -3216,7 +3216,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3216
3216
|
break;
|
|
3217
3217
|
}
|
|
3218
3218
|
this.raise(this.start, "Unterminated template");
|
|
3219
|
-
},
|
|
3219
|
+
}, z.readEscapedChar = function(e) {
|
|
3220
3220
|
var t = this.input.charCodeAt(++this.pos);
|
|
3221
3221
|
switch (++this.pos, t) {
|
|
3222
3222
|
case 110: return "\n";
|
|
@@ -3241,10 +3241,10 @@ B.tryReadTemplateToken = function() {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
return ae(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3243
3243
|
}
|
|
3244
|
-
},
|
|
3244
|
+
}, z.readHexChar = function(e) {
|
|
3245
3245
|
var t = this.pos, n = this.readInt(16, e);
|
|
3246
3246
|
return n === null && this.invalidStringToken(t, "Bad character escape sequence"), n;
|
|
3247
|
-
},
|
|
3247
|
+
}, z.readWord1 = function() {
|
|
3248
3248
|
this.containsEsc = !1;
|
|
3249
3249
|
for (var e = "", t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length;) {
|
|
3250
3250
|
var i = this.fullCharCodeAtPos();
|
|
@@ -3259,14 +3259,14 @@ B.tryReadTemplateToken = function() {
|
|
|
3259
3259
|
t = !1;
|
|
3260
3260
|
}
|
|
3261
3261
|
return e + this.input.slice(n, this.pos);
|
|
3262
|
-
},
|
|
3262
|
+
}, z.readWord = function() {
|
|
3263
3263
|
var e = this.readWord1(), t = E.name;
|
|
3264
3264
|
return this.keywords.test(e) && (t = re[e]), this.finishToken(t, e);
|
|
3265
3265
|
};
|
|
3266
|
-
var
|
|
3266
|
+
var en = "8.17.0";
|
|
3267
3267
|
k.acorn = {
|
|
3268
3268
|
Parser: k,
|
|
3269
|
-
version:
|
|
3269
|
+
version: en,
|
|
3270
3270
|
defaultOptions: be,
|
|
3271
3271
|
Position: _e,
|
|
3272
3272
|
SourceLocation: ve,
|
|
@@ -3279,24 +3279,24 @@ k.acorn = {
|
|
|
3279
3279
|
tokContexts: F,
|
|
3280
3280
|
isIdentifierChar: b,
|
|
3281
3281
|
isIdentifierStart: y,
|
|
3282
|
-
Token:
|
|
3282
|
+
Token: Xt,
|
|
3283
3283
|
isNewLine: ae,
|
|
3284
3284
|
lineBreak: D,
|
|
3285
3285
|
lineBreakG: ie,
|
|
3286
3286
|
nonASCIIwhitespace: se
|
|
3287
3287
|
};
|
|
3288
|
-
function
|
|
3288
|
+
function tn(e, t) {
|
|
3289
3289
|
return k.parse(e, t);
|
|
3290
3290
|
}
|
|
3291
|
-
function
|
|
3291
|
+
function nn(e, t, n) {
|
|
3292
3292
|
return k.parseExpressionAt(e, t, n);
|
|
3293
3293
|
}
|
|
3294
|
-
function
|
|
3294
|
+
function rn(e, t) {
|
|
3295
3295
|
return k.tokenizer(e, t);
|
|
3296
3296
|
}
|
|
3297
3297
|
//#endregion
|
|
3298
3298
|
//#region node_modules/acorn-typescript/lib/index.mjs
|
|
3299
|
-
function
|
|
3299
|
+
function an(e, t) {
|
|
3300
3300
|
for (var n = 0; n < t.length; n++) {
|
|
3301
3301
|
var r = t[n];
|
|
3302
3302
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (i = function(e, t) {
|
|
@@ -3312,36 +3312,36 @@ function rn(e, t) {
|
|
|
3312
3312
|
}
|
|
3313
3313
|
var i;
|
|
3314
3314
|
}
|
|
3315
|
-
function
|
|
3316
|
-
return
|
|
3315
|
+
function on() {
|
|
3316
|
+
return on = Object.assign ? Object.assign.bind() : function(e) {
|
|
3317
3317
|
for (var t = 1; t < arguments.length; t++) {
|
|
3318
3318
|
var n = arguments[t];
|
|
3319
3319
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3320
3320
|
}
|
|
3321
3321
|
return e;
|
|
3322
|
-
},
|
|
3323
|
-
}
|
|
3324
|
-
function on(e, t) {
|
|
3325
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t);
|
|
3322
|
+
}, on.apply(this, arguments);
|
|
3326
3323
|
}
|
|
3327
3324
|
function sn(e, t) {
|
|
3328
|
-
|
|
3329
|
-
return e.__proto__ = t, e;
|
|
3330
|
-
}, sn(e, t);
|
|
3325
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, cn(e, t);
|
|
3331
3326
|
}
|
|
3332
3327
|
function cn(e, t) {
|
|
3328
|
+
return cn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
3329
|
+
return e.__proto__ = t, e;
|
|
3330
|
+
}, cn(e, t);
|
|
3331
|
+
}
|
|
3332
|
+
function ln(e, t) {
|
|
3333
3333
|
(t == null || t > e.length) && (t = e.length);
|
|
3334
3334
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
3335
3335
|
return r;
|
|
3336
3336
|
}
|
|
3337
|
-
function
|
|
3337
|
+
function un(e, t) {
|
|
3338
3338
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3339
3339
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
3340
3340
|
if (Array.isArray(e) || (n = function(e, t) {
|
|
3341
3341
|
if (e) {
|
|
3342
|
-
if (typeof e == "string") return
|
|
3342
|
+
if (typeof e == "string") return ln(e, t);
|
|
3343
3343
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3344
|
-
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) ?
|
|
3344
|
+
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;
|
|
3345
3345
|
}
|
|
3346
3346
|
}(e)) || t && e && typeof e.length == "number") {
|
|
3347
3347
|
n && (e = n);
|
|
@@ -3355,28 +3355,28 @@ function ln(e, t) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3357
3357
|
}
|
|
3358
|
-
var
|
|
3359
|
-
function
|
|
3358
|
+
var B = !0;
|
|
3359
|
+
function V(e, t) {
|
|
3360
3360
|
return t === void 0 && (t = {}), new x("name", t);
|
|
3361
3361
|
}
|
|
3362
|
-
var
|
|
3363
|
-
function
|
|
3364
|
-
var t =
|
|
3362
|
+
var dn = /* @__PURE__ */ new WeakMap();
|
|
3363
|
+
function fn(e) {
|
|
3364
|
+
var t = dn.get(e.Parser.acorn || e);
|
|
3365
3365
|
if (!t) {
|
|
3366
3366
|
var n = {
|
|
3367
|
-
assert:
|
|
3368
|
-
asserts:
|
|
3369
|
-
global:
|
|
3370
|
-
keyof:
|
|
3371
|
-
readonly:
|
|
3372
|
-
unique:
|
|
3373
|
-
abstract:
|
|
3374
|
-
declare:
|
|
3375
|
-
enum:
|
|
3376
|
-
module:
|
|
3377
|
-
namespace:
|
|
3378
|
-
interface:
|
|
3379
|
-
type:
|
|
3367
|
+
assert: V(0, { startsExpr: B }),
|
|
3368
|
+
asserts: V(0, { startsExpr: B }),
|
|
3369
|
+
global: V(0, { startsExpr: B }),
|
|
3370
|
+
keyof: V(0, { startsExpr: B }),
|
|
3371
|
+
readonly: V(0, { startsExpr: B }),
|
|
3372
|
+
unique: V(0, { startsExpr: B }),
|
|
3373
|
+
abstract: V(0, { startsExpr: B }),
|
|
3374
|
+
declare: V(0, { startsExpr: B }),
|
|
3375
|
+
enum: V(0, { startsExpr: B }),
|
|
3376
|
+
module: V(0, { startsExpr: B }),
|
|
3377
|
+
namespace: V(0, { startsExpr: B }),
|
|
3378
|
+
interface: V(0, { startsExpr: B }),
|
|
3379
|
+
type: V(0, { startsExpr: B })
|
|
3380
3380
|
}, r = {
|
|
3381
3381
|
at: new x("@"),
|
|
3382
3382
|
jsxName: new x("jsxName"),
|
|
@@ -3394,8 +3394,8 @@ function dn(e) {
|
|
|
3394
3394
|
var t = this.context.pop();
|
|
3395
3395
|
t === i.tc_oTag && e === E.slash || t === i.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === i.tc_expr) : this.exprAllowed = !0;
|
|
3396
3396
|
}, t = {
|
|
3397
|
-
tokTypes:
|
|
3398
|
-
tokContexts:
|
|
3397
|
+
tokTypes: on({}, n, r),
|
|
3398
|
+
tokContexts: on({}, i),
|
|
3399
3399
|
keywordsRegExp: a,
|
|
3400
3400
|
tokenIsLiteralPropertyName: function(e) {
|
|
3401
3401
|
return [
|
|
@@ -3435,18 +3435,18 @@ function dn(e) {
|
|
|
3435
3435
|
}
|
|
3436
3436
|
return t;
|
|
3437
3437
|
}
|
|
3438
|
-
var
|
|
3438
|
+
var pn = 1024, mn = RegExp("(?=(" + (/* @__PURE__ */ RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y")).source + "))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)", "y"), hn = function() {
|
|
3439
3439
|
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;
|
|
3440
3440
|
};
|
|
3441
|
-
function
|
|
3441
|
+
function gn(e, t) {
|
|
3442
3442
|
var n = t.key.name, r = e[n], i = "true";
|
|
3443
3443
|
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);
|
|
3444
3444
|
}
|
|
3445
|
-
function
|
|
3445
|
+
function _n(e, t) {
|
|
3446
3446
|
var n = e.key;
|
|
3447
3447
|
return !e.computed && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
3448
3448
|
}
|
|
3449
|
-
var
|
|
3449
|
+
var H = {
|
|
3450
3450
|
AbstractMethodHasImplementation: function(e) {
|
|
3451
3451
|
return "Method '" + e.methodName + "' cannot have an implementation because it is marked abstract.";
|
|
3452
3452
|
},
|
|
@@ -3547,7 +3547,7 @@ var U = {
|
|
|
3547
3547
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
3548
3548
|
},
|
|
3549
3549
|
LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."
|
|
3550
|
-
},
|
|
3550
|
+
}, vn = {
|
|
3551
3551
|
quot: "\"",
|
|
3552
3552
|
amp: "&",
|
|
3553
3553
|
apos: "'",
|
|
@@ -3801,38 +3801,38 @@ var U = {
|
|
|
3801
3801
|
clubs: "♣",
|
|
3802
3802
|
hearts: "♥",
|
|
3803
3803
|
diams: "♦"
|
|
3804
|
-
},
|
|
3805
|
-
function
|
|
3806
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
3804
|
+
}, yn = /^[\da-fA-F]+$/, bn = /^\d+$/;
|
|
3805
|
+
function xn(e) {
|
|
3806
|
+
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);
|
|
3807
3807
|
}
|
|
3808
|
-
var
|
|
3809
|
-
function
|
|
3808
|
+
var Sn = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3809
|
+
function Cn(e) {
|
|
3810
3810
|
if (!e) throw Error("Assert fail");
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3812
|
+
function wn(e) {
|
|
3813
3813
|
return e === "accessor";
|
|
3814
3814
|
}
|
|
3815
|
-
function
|
|
3815
|
+
function Tn(e) {
|
|
3816
3816
|
return e === "in" || e === "out";
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function En(e, t) {
|
|
3819
3819
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
3820
3820
|
}
|
|
3821
|
-
function
|
|
3821
|
+
function Dn(e) {
|
|
3822
3822
|
if (e.type !== "MemberExpression") return !1;
|
|
3823
3823
|
var t = e.property;
|
|
3824
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
3825
|
-
}
|
|
3826
|
-
function Dn(e) {
|
|
3827
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && Dn(e.object);
|
|
3824
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && On(e.object);
|
|
3828
3825
|
}
|
|
3829
3826
|
function On(e) {
|
|
3830
|
-
return e === "
|
|
3827
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && On(e.object);
|
|
3831
3828
|
}
|
|
3832
3829
|
function kn(e) {
|
|
3830
|
+
return e === "private" || e === "public" || e === "protected";
|
|
3831
|
+
}
|
|
3832
|
+
function An(e) {
|
|
3833
3833
|
var t = e || {}, n = t.dts, r = n !== void 0 && n, i = t.allowSatisfies, a = i !== void 0 && i;
|
|
3834
3834
|
return function(t) {
|
|
3835
|
-
var n = t.acorn || u, i =
|
|
3835
|
+
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;
|
|
3836
3836
|
function b(e, t, n) {
|
|
3837
3837
|
n === void 0 && (n = e.length);
|
|
3838
3838
|
for (var r = t; r < n; r++) {
|
|
@@ -3847,7 +3847,7 @@ function kn(e) {
|
|
|
3847
3847
|
function t() {
|
|
3848
3848
|
return e.apply(this, arguments) || this;
|
|
3849
3849
|
}
|
|
3850
|
-
|
|
3850
|
+
sn(t, e);
|
|
3851
3851
|
var n = t.prototype;
|
|
3852
3852
|
return n.takeDecorators = function(e) {
|
|
3853
3853
|
var t = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3890,7 +3890,7 @@ function kn(e) {
|
|
|
3890
3890
|
function t() {
|
|
3891
3891
|
return e.apply(this, arguments) || this;
|
|
3892
3892
|
}
|
|
3893
|
-
|
|
3893
|
+
sn(t, e);
|
|
3894
3894
|
var n = t.prototype;
|
|
3895
3895
|
return n.jsx_readToken = function() {
|
|
3896
3896
|
for (var e = "", t = this.pos;;) {
|
|
@@ -3923,7 +3923,7 @@ function kn(e) {
|
|
|
3923
3923
|
r !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
3924
3924
|
for (var i = ++this.pos; this.pos < this.input.length && n++ < 10;) {
|
|
3925
3925
|
if ((r = this.input[this.pos++]) === ";") {
|
|
3926
|
-
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2),
|
|
3926
|
+
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];
|
|
3927
3927
|
break;
|
|
3928
3928
|
}
|
|
3929
3929
|
t += r;
|
|
@@ -3997,7 +3997,7 @@ function kn(e) {
|
|
|
3997
3997
|
break;
|
|
3998
3998
|
default: this.unexpected();
|
|
3999
3999
|
}
|
|
4000
|
-
|
|
4000
|
+
xn(s.name) !== xn(o.name) && this.raise(s.start, "Expected corresponding JSX closing tag for <" + xn(o.name) + ">");
|
|
4001
4001
|
}
|
|
4002
4002
|
var c = o.name ? "Element" : "Fragment";
|
|
4003
4003
|
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);
|
|
@@ -4015,7 +4015,7 @@ function kn(e) {
|
|
|
4015
4015
|
function t() {
|
|
4016
4016
|
return e.apply(this, arguments) || this;
|
|
4017
4017
|
}
|
|
4018
|
-
|
|
4018
|
+
sn(t, e);
|
|
4019
4019
|
var n = t.prototype;
|
|
4020
4020
|
return n.parseMaybeImportAttributes = function(e) {
|
|
4021
4021
|
if (this.type === i._with || this.type === r.assert) {
|
|
@@ -4046,10 +4046,10 @@ function kn(e) {
|
|
|
4046
4046
|
}(i), {
|
|
4047
4047
|
allowedModifiers: ["const"],
|
|
4048
4048
|
disallowedModifiers: ["in", "out"],
|
|
4049
|
-
errorTemplate:
|
|
4049
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
4050
4050
|
}), i;
|
|
4051
4051
|
}
|
|
4052
|
-
|
|
4052
|
+
sn(t, e);
|
|
4053
4053
|
var u, x, S, C = t.prototype;
|
|
4054
4054
|
return C.getTokenFromCodeInType = function(t) {
|
|
4055
4055
|
return t === 62 || t === 60 ? this.finishOp(o.relational, 1) : e.prototype.getTokenFromCode.call(this, t);
|
|
@@ -4117,14 +4117,14 @@ function kn(e) {
|
|
|
4117
4117
|
return this.nextTokenStartSince(this.pos);
|
|
4118
4118
|
}, C.tsHasSomeModifiers = function(e, t) {
|
|
4119
4119
|
return t.some(function(t) {
|
|
4120
|
-
return
|
|
4120
|
+
return kn(t) ? e.accessibility === t : !!e[t];
|
|
4121
4121
|
});
|
|
4122
4122
|
}, C.tsIsStartOfStaticBlocks = function() {
|
|
4123
4123
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
4124
4124
|
}, C.tsCheckForInvalidTypeCasts = function(e) {
|
|
4125
4125
|
var t = this;
|
|
4126
4126
|
e.forEach(function(e) {
|
|
4127
|
-
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start,
|
|
4127
|
+
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start, H.UnexpectedTypeAnnotation);
|
|
4128
4128
|
});
|
|
4129
4129
|
}, C.atPossibleAsyncArrow = function(e) {
|
|
4130
4130
|
return e.type === "Identifier" && e.name === "async" && this.lastTokEndLoc.column === e.end && !this.canInsertSemicolon() && e.end - e.start == 5 && e.start === this.potentialArrowAt;
|
|
@@ -4165,7 +4165,7 @@ function kn(e) {
|
|
|
4165
4165
|
}, C.isAbstractConstructorSignature = function() {
|
|
4166
4166
|
return this.ts_isContextual(m.abstract) && this.lookahead().type === o._new;
|
|
4167
4167
|
}, C.nextTokenStartSince = function(e) {
|
|
4168
|
-
return
|
|
4168
|
+
return Sn.lastIndex = e, Sn.test(this.input) ? Sn.lastIndex : e;
|
|
4169
4169
|
}, C.lookaheadCharCode = function() {
|
|
4170
4170
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4171
4171
|
}, C.compareLookaheadState = function(e, t) {
|
|
@@ -4249,7 +4249,7 @@ function kn(e) {
|
|
|
4249
4249
|
}, C.isLineTerminator = function() {
|
|
4250
4250
|
return this.eat(o.semi) || e.prototype.canInsertSemicolon.call(this);
|
|
4251
4251
|
}, C.hasFollowingLineBreak = function() {
|
|
4252
|
-
return
|
|
4252
|
+
return mn.lastIndex = this.end, mn.test(this.input);
|
|
4253
4253
|
}, C.addExtra = function(e, t, n, r) {
|
|
4254
4254
|
if (r === void 0 && (r = !0), e) {
|
|
4255
4255
|
var i = e.extra = e.extra || {};
|
|
@@ -4341,7 +4341,7 @@ function kn(e) {
|
|
|
4341
4341
|
}
|
|
4342
4342
|
return this.next(), e.prototype.exitScope.call(this), this.finishNode(t, "TSModuleBlock");
|
|
4343
4343
|
}, C.tsParseAmbientExternalModuleDeclaration = function(t) {
|
|
4344
|
-
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,
|
|
4344
|
+
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");
|
|
4345
4345
|
}, C.tsTryParseDeclare = function(e) {
|
|
4346
4346
|
var t = this;
|
|
4347
4347
|
if (!this.isLineTerminator()) {
|
|
@@ -4442,7 +4442,7 @@ function kn(e) {
|
|
|
4442
4442
|
}, C.tsParseBindingListForSignature = function() {
|
|
4443
4443
|
var t = this;
|
|
4444
4444
|
return e.prototype.parseBindingList.call(this, o.parenR, !0, !0).map(function(e) {
|
|
4445
|
-
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start,
|
|
4445
|
+
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start, H.UnsupportedSignatureParameterKind(e.type)), e;
|
|
4446
4446
|
});
|
|
4447
4447
|
}, C.tsParseTypePredicateAsserts = function() {
|
|
4448
4448
|
if (this.type !== m.asserts) return !1;
|
|
@@ -4488,7 +4488,7 @@ function kn(e) {
|
|
|
4488
4488
|
if (this.lookahead().type !== o._const) return null;
|
|
4489
4489
|
this.next();
|
|
4490
4490
|
var e = this.tsParseTypeReference();
|
|
4491
|
-
return e.typeParameters && this.raise(e.typeName.start,
|
|
4491
|
+
return e.typeParameters && this.raise(e.typeName.start, H.CannotFindName({ name: "const" })), e;
|
|
4492
4492
|
}, C.tsParseFunctionOrConstructorType = function(e, t) {
|
|
4493
4493
|
var n = this, r = this.startNode();
|
|
4494
4494
|
return e === "TSConstructorType" && (r.abstract = !!t, t && this.next(), this.next()), this.tsInAllowConditionalTypesContext(function() {
|
|
@@ -4504,7 +4504,7 @@ function kn(e) {
|
|
|
4504
4504
|
switch (e.typeAnnotation.type) {
|
|
4505
4505
|
case "TSTupleType":
|
|
4506
4506
|
case "TSArrayType": return;
|
|
4507
|
-
default: this.raise(e.start,
|
|
4507
|
+
default: this.raise(e.start, H.UnexpectedReadonly);
|
|
4508
4508
|
}
|
|
4509
4509
|
}, C.tsParseTypeOperator = function() {
|
|
4510
4510
|
var e = this.startNode(), t = this.value;
|
|
@@ -4537,7 +4537,7 @@ function kn(e) {
|
|
|
4537
4537
|
}(), this.finishNode(t, "TSLiteralType");
|
|
4538
4538
|
}, C.tsParseImportType = function() {
|
|
4539
4539
|
var e = this.startNode();
|
|
4540
|
-
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start,
|
|
4540
|
+
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");
|
|
4541
4541
|
}, C.tsParseTypeQuery = function() {
|
|
4542
4542
|
var e = this.startNode();
|
|
4543
4543
|
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");
|
|
@@ -4554,7 +4554,7 @@ function kn(e) {
|
|
|
4554
4554
|
var e = this.startLoc, t = this.start, n = this.eat(o.ellipsis), r = this.tsParseType(), i = this.eat(o.question);
|
|
4555
4555
|
if (this.eat(o.colon)) {
|
|
4556
4556
|
var a = this.startNodeAtNode(r);
|
|
4557
|
-
a.optional = i, r.type !== "TSTypeReference" || r.typeParameters || r.typeName.type !== "Identifier" ? (this.raise(r.start,
|
|
4557
|
+
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");
|
|
4558
4558
|
} else if (i) {
|
|
4559
4559
|
var s = this.startNodeAtNode(r);
|
|
4560
4560
|
s.typeAnnotation = r, r = this.finishNode(s, "TSOptionalType");
|
|
@@ -4570,11 +4570,11 @@ function kn(e) {
|
|
|
4570
4570
|
var n = !1, r = null;
|
|
4571
4571
|
return t.elementTypes.forEach(function(t) {
|
|
4572
4572
|
var i = t.type;
|
|
4573
|
-
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start,
|
|
4573
|
+
!n || i === "TSRestType" || i === "TSOptionalType" || i === "TSNamedTupleMember" && t.optional || e.raise(t.start, H.OptionalTypeBeforeRequired), n ||= i === "TSNamedTupleMember" && t.optional || i === "TSOptionalType";
|
|
4574
4574
|
var a = i;
|
|
4575
4575
|
i === "TSRestType" && (a = (t = t.typeAnnotation).type);
|
|
4576
4576
|
var o = a === "TSNamedTupleMember";
|
|
4577
|
-
r ??= o, r !== o && e.raise(t.start,
|
|
4577
|
+
r ??= o, r !== o && e.raise(t.start, H.MixedLabeledAndUnlabeledElements);
|
|
4578
4578
|
}), this.finishNode(t, "TSTupleType");
|
|
4579
4579
|
}, C.tsParseTemplateLiteralType = function() {
|
|
4580
4580
|
var e = this.startNode();
|
|
@@ -4657,7 +4657,7 @@ function kn(e) {
|
|
|
4657
4657
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
4658
4658
|
}, C.tsParseType = function() {
|
|
4659
4659
|
var e = this;
|
|
4660
|
-
|
|
4660
|
+
Cn(this.inType);
|
|
4661
4661
|
var t = this.tsParseNonConditionalType();
|
|
4662
4662
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return t;
|
|
4663
4663
|
var n = this.startNodeAtNode(t);
|
|
@@ -4691,7 +4691,7 @@ function kn(e) {
|
|
|
4691
4691
|
modified: e,
|
|
4692
4692
|
allowedModifiers: [],
|
|
4693
4693
|
disallowedModifiers: ["in", "out"],
|
|
4694
|
-
errorTemplate:
|
|
4694
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
4695
4695
|
});
|
|
4696
4696
|
}, C.tsParseTypeParameter = function(e) {
|
|
4697
4697
|
e === void 0 && (e = this.tsParseNoneModifiers.bind(this));
|
|
@@ -4701,7 +4701,7 @@ function kn(e) {
|
|
|
4701
4701
|
var t = this.startNode();
|
|
4702
4702
|
this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart") ? this.next() : this.unexpected();
|
|
4703
4703
|
var n = { value: -1 };
|
|
4704
|
-
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start,
|
|
4704
|
+
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");
|
|
4705
4705
|
}, C.tsTryParseTypeParameters = function(e) {
|
|
4706
4706
|
if (this.tsMatchLeftRelational()) return this.tsParseTypeParameters(e);
|
|
4707
4707
|
}, C.tsTryParse = function(e) {
|
|
@@ -4725,14 +4725,14 @@ function kn(e) {
|
|
|
4725
4725
|
t[a] = n[a];
|
|
4726
4726
|
}
|
|
4727
4727
|
}, C.tsParseModifiers = function(e) {
|
|
4728
|
-
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ?
|
|
4729
|
-
r === i && n[a] && t.raise(e.column,
|
|
4728
|
+
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) {
|
|
4729
|
+
r === i && n[a] && t.raise(e.column, H.InvalidModifiersOrder({ orderedModifiers: [i, a] }));
|
|
4730
4730
|
}, u = function(e, r, i, a) {
|
|
4731
|
-
(n[i] && r === a || n[a] && r === i) && t.raise(e.column,
|
|
4731
|
+
(n[i] && r === a || n[a] && r === i) && t.raise(e.column, H.IncompatibleModifiers({ modifiers: [i, a] }));
|
|
4732
4732
|
};;) {
|
|
4733
4733
|
var d = this.startLoc, f = this.tsParseModifier(r.concat(i ?? []), a);
|
|
4734
4734
|
if (!f) break;
|
|
4735
|
-
|
|
4735
|
+
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);
|
|
4736
4736
|
}
|
|
4737
4737
|
return c;
|
|
4738
4738
|
}, C.tsParseInOutModifiers = function(e) {
|
|
@@ -4748,7 +4748,7 @@ function kn(e) {
|
|
|
4748
4748
|
"abstract",
|
|
4749
4749
|
"override"
|
|
4750
4750
|
],
|
|
4751
|
-
errorTemplate:
|
|
4751
|
+
errorTemplate: H.InvalidModifierOnTypeParameter
|
|
4752
4752
|
});
|
|
4753
4753
|
}, C.tsParseTypeArguments = function() {
|
|
4754
4754
|
var e = this, t = this.startNode();
|
|
@@ -4756,13 +4756,13 @@ function kn(e) {
|
|
|
4756
4756
|
return e.tsInNoContext(function() {
|
|
4757
4757
|
return e.expect(o.relational), e.tsParseDelimitedList("TypeParametersOrArguments", e.tsParseType.bind(e));
|
|
4758
4758
|
});
|
|
4759
|
-
}), t.params.length === 0 && this.raise(this.start,
|
|
4759
|
+
}), t.params.length === 0 && this.raise(this.start, H.EmptyTypeArguments), this.exprAllowed = !1, this.expect(o.relational), this.finishNode(t, "TSTypeParameterInstantiation");
|
|
4760
4760
|
}, C.tsParseHeritageClause = function(e) {
|
|
4761
4761
|
var t = this, n = this.start, r = this.tsParseDelimitedList("HeritageClauseElement", function() {
|
|
4762
4762
|
var e = t.startNode();
|
|
4763
4763
|
return e.expression = t.tsParseEntityName(), t.tsMatchLeftRelational() && (e.typeParameters = t.tsParseTypeArguments()), t.finishNode(e, "TSExpressionWithTypeArguments");
|
|
4764
4764
|
});
|
|
4765
|
-
return r.length || this.raise(n,
|
|
4765
|
+
return r.length || this.raise(n, H.EmptyHeritageClauseType({ token: e })), r;
|
|
4766
4766
|
}, C.tsParseTypeMemberSemicolon = function() {
|
|
4767
4767
|
this.eat(o.comma) || this.isLineTerminator() || this.expect(o.semi);
|
|
4768
4768
|
}, C.tsTryParseAndCatch = function(e) {
|
|
@@ -4776,18 +4776,18 @@ function kn(e) {
|
|
|
4776
4776
|
this.eat(o.question) && (e.optional = !0);
|
|
4777
4777
|
var n = e;
|
|
4778
4778
|
if (this.match(o.parenL) || this.tsMatchLeftRelational()) {
|
|
4779
|
-
t && this.raise(e.start,
|
|
4779
|
+
t && this.raise(e.start, H.ReadonlyForMethodSignature);
|
|
4780
4780
|
var r = n;
|
|
4781
|
-
r.kind && this.tsMatchLeftRelational() && this.raise(this.start,
|
|
4781
|
+
r.kind && this.tsMatchLeftRelational() && this.raise(this.start, H.AccesorCannotHaveTypeParameters), this.tsFillSignature(o.colon, r), this.tsParseTypeMemberSemicolon();
|
|
4782
4782
|
var i = "parameters", a = "typeAnnotation";
|
|
4783
|
-
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,
|
|
4783
|
+
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));
|
|
4784
4784
|
else if (r.kind === "set") {
|
|
4785
4785
|
if (r[i].length !== 1) this.raise(this.start, "A 'get' accesor must not have any formal parameters.");
|
|
4786
4786
|
else {
|
|
4787
4787
|
var s = r[i][0];
|
|
4788
|
-
this.isThisParam(s) && this.raise(this.start,
|
|
4788
|
+
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);
|
|
4789
4789
|
}
|
|
4790
|
-
r[a] && this.raise(r[a].start,
|
|
4790
|
+
r[a] && this.raise(r[a].start, H.SetAccesorCannotHaveReturnType);
|
|
4791
4791
|
} else r.kind = "method";
|
|
4792
4792
|
return this.finishNode(r, "TSMethodSignature");
|
|
4793
4793
|
}
|
|
@@ -4824,7 +4824,7 @@ function kn(e) {
|
|
|
4824
4824
|
return this.expect(o.braceR), e;
|
|
4825
4825
|
}, C.tsParseInterfaceDeclaration = function(e, t) {
|
|
4826
4826
|
if (t === void 0 && (t = {}), this.hasFollowingLineBreak()) return null;
|
|
4827
|
-
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,
|
|
4827
|
+
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"));
|
|
4828
4828
|
var n = this.startNode();
|
|
4829
4829
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
|
|
4830
4830
|
}, C.tsParseAbstractDeclaration = function(e) {
|
|
@@ -4842,7 +4842,7 @@ function kn(e) {
|
|
|
4842
4842
|
break;
|
|
4843
4843
|
case "global":
|
|
4844
4844
|
if (this.match(o.braceL)) {
|
|
4845
|
-
e.prototype.enterScope.call(this,
|
|
4845
|
+
e.prototype.enterScope.call(this, pn);
|
|
4846
4846
|
var i = t;
|
|
4847
4847
|
return i.global = !0, i.id = n, i.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
4848
4848
|
}
|
|
@@ -4881,7 +4881,7 @@ function kn(e) {
|
|
|
4881
4881
|
if (n === void 0 && (n = !1), t.id = this.parseIdent(), n || this.checkLValSimple(t.id, 8), this.eat(o.dot)) {
|
|
4882
4882
|
var r = this.startNode();
|
|
4883
4883
|
this.tsParseModuleOrNamespaceDeclaration(r, !0), t.body = r;
|
|
4884
|
-
} else e.prototype.enterScope.call(this,
|
|
4884
|
+
} else e.prototype.enterScope.call(this, pn), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this);
|
|
4885
4885
|
return this.finishNode(t, "TSModuleDeclaration");
|
|
4886
4886
|
}, C.checkLValSimple = function(t, n, r) {
|
|
4887
4887
|
return n === void 0 && (n = 0), e.prototype.checkLValSimple.call(this, t, n, r);
|
|
@@ -4915,7 +4915,7 @@ function kn(e) {
|
|
|
4915
4915
|
}, C.tsParseImportEqualsDeclaration = function(t, n) {
|
|
4916
4916
|
t.isExport = n || !1, t.id = this.parseIdent(), this.checkLValSimple(t.id, 2), e.prototype.expect.call(this, o.eq);
|
|
4917
4917
|
var r = this.tsParseModuleReference();
|
|
4918
|
-
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start,
|
|
4918
|
+
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");
|
|
4919
4919
|
}, C.isExportDefaultSpecifier = function() {
|
|
4920
4920
|
if (this.tsIsDeclarationStart()) return !1;
|
|
4921
4921
|
var e = this.type;
|
|
@@ -4942,13 +4942,13 @@ function kn(e) {
|
|
|
4942
4942
|
}, C.parseFunction = function(e, t, n, r, i) {
|
|
4943
4943
|
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());
|
|
4944
4944
|
var a = this.yieldPos, s = this.awaitPos, c = this.awaitIdentPos, l = this.maybeInArrowParameters;
|
|
4945
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4945
|
+
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);
|
|
4946
4946
|
var u = 1 & t;
|
|
4947
4947
|
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");
|
|
4948
4948
|
}, C.parseFunctionBody = function(t, n, r, i, a) {
|
|
4949
4949
|
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));
|
|
4950
4950
|
var s = a != null && a.isFunctionDeclaration ? "TSDeclareFunction" : a != null && a.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
4951
|
-
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start,
|
|
4951
|
+
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);
|
|
4952
4952
|
}, C.parseNew = function() {
|
|
4953
4953
|
var e;
|
|
4954
4954
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
@@ -4989,7 +4989,7 @@ function kn(e) {
|
|
|
4989
4989
|
return this.importOrExportOuterKind = "value", r;
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
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,
|
|
4992
|
+
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;
|
|
4993
4993
|
}, C.parseExportDefaultDeclaration = function() {
|
|
4994
4994
|
if (this.isAbstractClass()) {
|
|
4995
4995
|
var t = this.startNode();
|
|
@@ -5029,7 +5029,7 @@ function kn(e) {
|
|
|
5029
5029
|
else {
|
|
5030
5030
|
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);
|
|
5031
5031
|
else {
|
|
5032
|
-
for (var s, c =
|
|
5032
|
+
for (var s, c = un(e.specifiers); !(s = c()).done;) {
|
|
5033
5033
|
var l = s.value;
|
|
5034
5034
|
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`.");
|
|
5035
5035
|
}
|
|
@@ -5042,7 +5042,7 @@ function kn(e) {
|
|
|
5042
5042
|
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), e[t] = !0);
|
|
5043
5043
|
}, C.parseMaybeDefault = function(t, n, r) {
|
|
5044
5044
|
var i = e.prototype.parseMaybeDefault.call(this, t, n, r);
|
|
5045
|
-
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start,
|
|
5045
|
+
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start, H.TypeAnnotationAfterAssign), i;
|
|
5046
5046
|
}, C.typeCastToParameter = function(e) {
|
|
5047
5047
|
return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.end), e.expression;
|
|
5048
5048
|
}, C.toAssignableList = function(t, n) {
|
|
@@ -5091,9 +5091,9 @@ function kn(e) {
|
|
|
5091
5091
|
this.next(), e.prototype.parseVar.call(this, t, !1, n, r || i), this.semicolon();
|
|
5092
5092
|
var a = this.finishNode(t, "VariableDeclaration");
|
|
5093
5093
|
if (!i) return a;
|
|
5094
|
-
for (var o, s =
|
|
5094
|
+
for (var o, s = un(a.declarations); !(o = s()).done;) {
|
|
5095
5095
|
var c = o.value, l = c.init;
|
|
5096
|
-
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start,
|
|
5096
|
+
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));
|
|
5097
5097
|
}
|
|
5098
5098
|
return a;
|
|
5099
5099
|
}, C.parseStatement = function(t, n, r) {
|
|
@@ -5114,7 +5114,7 @@ function kn(e) {
|
|
|
5114
5114
|
"private"
|
|
5115
5115
|
]);
|
|
5116
5116
|
}, C.parsePostMemberNameModifiers = function(e) {
|
|
5117
|
-
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start,
|
|
5117
|
+
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);
|
|
5118
5118
|
}, C.parseExpressionStatement = function(t, n) {
|
|
5119
5119
|
return (n.type === "Identifier" ? this.tsParseExpressionStatement(t, n) : void 0) || e.prototype.parseExpressionStatement.call(this, t, n);
|
|
5120
5120
|
}, C.shouldParseExportStatement = function() {
|
|
@@ -5146,7 +5146,7 @@ function kn(e) {
|
|
|
5146
5146
|
return t.parseExportDeclaration(e);
|
|
5147
5147
|
});
|
|
5148
5148
|
var n = this.start, r = this.startLoc, i = this.eatContextual("declare");
|
|
5149
|
-
!i || !this.ts_isContextual(m.declare) && this.shouldParseExportStatement() || this.raise(this.start,
|
|
5149
|
+
!i || !this.ts_isContextual(m.declare) && this.shouldParseExportStatement() || this.raise(this.start, H.ExpectedAmbientAfterExportDeclare);
|
|
5150
5150
|
var a = v(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
5151
5151
|
return a ? ((a.type === "TSInterfaceDeclaration" || a.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(a, n, r), a.declare = !0), a) : null;
|
|
5152
5152
|
}, C.parseClassId = function(t, n) {
|
|
@@ -5160,19 +5160,19 @@ function kn(e) {
|
|
|
5160
5160
|
var t = this.tsTryParseTypeAnnotation();
|
|
5161
5161
|
t && (e.typeAnnotation = t);
|
|
5162
5162
|
}, C.parseClassField = function(t) {
|
|
5163
|
-
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start,
|
|
5164
|
-
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start,
|
|
5163
|
+
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);
|
|
5164
|
+
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)) {
|
|
5165
5165
|
var n = t.key;
|
|
5166
|
-
this.raise(this.start,
|
|
5166
|
+
this.raise(this.start, H.AbstractPropertyHasInitializer({ propertyName: n.type !== "Identifier" || t.computed ? "[" + this.input.slice(n.start, n.end) + "]" : n.name }));
|
|
5167
5167
|
}
|
|
5168
5168
|
return e.prototype.parseClassField.call(this, t);
|
|
5169
5169
|
}, C.parseClassMethod = function(e, t, n, r) {
|
|
5170
5170
|
var i = e.kind === "constructor", a = e.key.type === "PrivateIdentifier", o = this.tsTryParseTypeParameters();
|
|
5171
|
-
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start,
|
|
5171
|
+
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start, H.PrivateMethodsHasAccessibility({ modifier: e.accessibility }))) : o && i && this.raise(o.start, H.ConstructorHasTypeParameters);
|
|
5172
5172
|
var s = e.declare, c = e.kind;
|
|
5173
|
-
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start,
|
|
5173
|
+
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start, H.DeclareAccessor({ kind: c })), o && (e.typeParameters = o);
|
|
5174
5174
|
var l = e.key;
|
|
5175
|
-
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 &&
|
|
5175
|
+
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");
|
|
5176
5176
|
var u = e.value = this.parseMethod(t, n, r, !0, e);
|
|
5177
5177
|
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");
|
|
5178
5178
|
}, C.isClassMethod = function() {
|
|
@@ -5196,23 +5196,23 @@ function kn(e) {
|
|
|
5196
5196
|
allowedModifiers: d,
|
|
5197
5197
|
disallowedModifiers: ["in", "out"],
|
|
5198
5198
|
stopOnStartOfClassStaticBlock: !0,
|
|
5199
|
-
errorTemplate:
|
|
5199
|
+
errorTemplate: H.InvalidModifierOnTypeParameterPositions
|
|
5200
5200
|
}).static;
|
|
5201
5201
|
var f = function() {
|
|
5202
5202
|
if (!n.tsIsStartOfStaticBlocks()) {
|
|
5203
5203
|
var f = n.tsTryParseIndexSignature(a);
|
|
5204
|
-
if (f) return a.abstract && n.raise(a.start,
|
|
5205
|
-
if (!n.inAbstractClass && a.abstract && n.raise(a.start,
|
|
5204
|
+
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;
|
|
5205
|
+
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) {
|
|
5206
5206
|
var p = n.value;
|
|
5207
5207
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? u = p : s = p);
|
|
5208
5208
|
}
|
|
5209
5209
|
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) {
|
|
5210
|
-
var m = !a.static &&
|
|
5210
|
+
var m = !a.static && _n(a, "constructor"), h = m && t;
|
|
5211
5211
|
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);
|
|
5212
5212
|
} else n.parseClassField(a);
|
|
5213
5213
|
return a;
|
|
5214
5214
|
}
|
|
5215
|
-
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start,
|
|
5215
|
+
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;
|
|
5216
5216
|
};
|
|
5217
5217
|
return a.declare ? this.tsInAmbientContext(f) : f(), a;
|
|
5218
5218
|
}, C.isClassElementNameStart = function() {
|
|
@@ -5229,7 +5229,7 @@ function kn(e) {
|
|
|
5229
5229
|
}, C.parseArrowExpression = function(e, t, n, r) {
|
|
5230
5230
|
this.match(o.colon) && (e.returnType = this.tsParseTypeAnnotation());
|
|
5231
5231
|
var i = this.yieldPos, a = this.awaitPos, s = this.awaitIdentPos;
|
|
5232
|
-
this.enterScope(16 |
|
|
5232
|
+
this.enterScope(16 | En(n, !1)), this.initFunction(e);
|
|
5233
5233
|
var c = this.maybeInArrowParameters;
|
|
5234
5234
|
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");
|
|
5235
5235
|
}, C.parseMaybeAssignOrigin = function(e, t, n) {
|
|
@@ -5238,7 +5238,7 @@ function kn(e) {
|
|
|
5238
5238
|
this.exprAllowed = !1;
|
|
5239
5239
|
}
|
|
5240
5240
|
var r = !1, i = -1, a = -1, s = -1;
|
|
5241
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
5241
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new hn(), r = !0);
|
|
5242
5242
|
var c = this.start, l = this.startLoc;
|
|
5243
5243
|
(this.type === o.parenL || v(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
5244
5244
|
var u = this.parseMaybeConditional(e, t);
|
|
@@ -5265,7 +5265,7 @@ function kn(e) {
|
|
|
5265
5265
|
return (a.type !== "ArrowFunctionExpression" || (i = a.extra) != null && i.parenthesized) && r(), f?.params.length !== 0 && p.resetStartLocationFromNode(a, f), a.typeParameters = f, a;
|
|
5266
5266
|
}, l);
|
|
5267
5267
|
if (!g.error && !g.aborted) return f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5268
|
-
if (!u && (
|
|
5268
|
+
if (!u && (Cn(!0), !(d = this.tryParse(function() {
|
|
5269
5269
|
return p.parseMaybeAssignOrigin(e, t, n);
|
|
5270
5270
|
}, l)).error)) return d.node;
|
|
5271
5271
|
if ((a = u) != null && a.node) return this.setLookaheadState(u.failState), u.node;
|
|
@@ -5286,20 +5286,20 @@ function kn(e) {
|
|
|
5286
5286
|
"override",
|
|
5287
5287
|
"readonly"
|
|
5288
5288
|
]
|
|
5289
|
-
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start,
|
|
5289
|
+
}), n = s.accessibility, o = s.override, a = s.readonly, !1 === e && (n || a || o) && this.raise(i.start, H.UnexpectedParameterModifier);
|
|
5290
5290
|
}
|
|
5291
5291
|
var c = this.parseMaybeDefault(r, i);
|
|
5292
5292
|
this.parseBindingListItem(c);
|
|
5293
5293
|
var l = this.parseMaybeDefault(c.start, c.loc, c);
|
|
5294
5294
|
if (t.length && (l.decorators = t), n || a || o) {
|
|
5295
5295
|
var u = this.startNodeAt(r, i);
|
|
5296
|
-
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start,
|
|
5296
|
+
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");
|
|
5297
5297
|
}
|
|
5298
5298
|
return l;
|
|
5299
5299
|
}, C.checkLValInnerPattern = function(t, n, r) {
|
|
5300
5300
|
n === void 0 && (n = 0), t.type === "TSParameterProperty" ? this.checkLValInnerPattern(t.parameter, n, r) : e.prototype.checkLValInnerPattern.call(this, t, n, r);
|
|
5301
5301
|
}, C.parseBindingListItem = function(e) {
|
|
5302
|
-
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start,
|
|
5302
|
+
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start, H.PatternIsOptional), e.optional = !0);
|
|
5303
5303
|
var t = this.tsTryParseTypeAnnotation();
|
|
5304
5304
|
return t && (e.typeAnnotation = t), this.resetEndLocation(e), e;
|
|
5305
5305
|
}, C.isAssignable = function(e, t) {
|
|
@@ -5330,12 +5330,12 @@ function kn(e) {
|
|
|
5330
5330
|
default: return !1;
|
|
5331
5331
|
}
|
|
5332
5332
|
}, C.toAssignable = function(t, n, r) {
|
|
5333
|
-
switch (n === void 0 && (n = !1), r === void 0 && (r = new
|
|
5333
|
+
switch (n === void 0 && (n = !1), r === void 0 && (r = new hn()), t.type) {
|
|
5334
5334
|
case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(t, n, r);
|
|
5335
5335
|
case "TSAsExpression":
|
|
5336
5336
|
case "TSSatisfiesExpression":
|
|
5337
5337
|
case "TSNonNullExpression":
|
|
5338
|
-
case "TSTypeAssertion": return n || this.raise(t.start,
|
|
5338
|
+
case "TSTypeAssertion": return n || this.raise(t.start, H.UnexpectedTypeCastInParameter), this.toAssignable(t.expression, n, r);
|
|
5339
5339
|
case "MemberExpression": break;
|
|
5340
5340
|
case "AssignmentExpression": return n || t.left.type !== "TSTypeCastExpression" || (t.left = this.typeCastToParameter(t.left)), e.prototype.toAssignable.call(this, t, n, r);
|
|
5341
5341
|
case "TSTypeCastExpression": return this.typeCastToParameter(t);
|
|
@@ -5387,7 +5387,7 @@ function kn(e) {
|
|
|
5387
5387
|
if (this.options.ecmaVersion >= 6) {
|
|
5388
5388
|
var s = this.maybeInArrowParameters;
|
|
5389
5389
|
this.maybeInArrowParameters = !0, this.next();
|
|
5390
|
-
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new
|
|
5390
|
+
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new hn(), h = this.yieldPos, g = this.awaitPos;
|
|
5391
5391
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR;) {
|
|
5392
5392
|
if (f ? f = !1 : this.expect(o.comma), a && this.afterTrailingComma(o.parenR, !0)) {
|
|
5393
5393
|
p = !0;
|
|
@@ -5456,7 +5456,7 @@ function kn(e) {
|
|
|
5456
5456
|
return u.typeParameters = a, u;
|
|
5457
5457
|
}
|
|
5458
5458
|
if (!r && c.eat(o.parenL)) {
|
|
5459
|
-
var p = new
|
|
5459
|
+
var p = new hn(), m = c.startNodeAt(t, n);
|
|
5460
5460
|
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");
|
|
5461
5461
|
}
|
|
5462
5462
|
var h = c.type;
|
|
@@ -5465,7 +5465,7 @@ function kn(e) {
|
|
|
5465
5465
|
return _.expression = e, _.typeParameters = a, c.finishNode(_, "TSInstantiationExpression");
|
|
5466
5466
|
}
|
|
5467
5467
|
});
|
|
5468
|
-
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,
|
|
5468
|
+
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;
|
|
5469
5469
|
}
|
|
5470
5470
|
var m = this.options.ecmaVersion >= 11, h = m && this.eat(o.questionDot);
|
|
5471
5471
|
r && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
@@ -5476,7 +5476,7 @@ function kn(e) {
|
|
|
5476
5476
|
} else if (!r && this.eat(o.parenL)) {
|
|
5477
5477
|
var te = this.maybeInArrowParameters;
|
|
5478
5478
|
this.maybeInArrowParameters = !0;
|
|
5479
|
-
var v = new
|
|
5479
|
+
var v = new hn(), ne = this.yieldPos, y = this.awaitPos, b = this.awaitIdentPos;
|
|
5480
5480
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
5481
5481
|
var x = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, v);
|
|
5482
5482
|
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);
|
|
@@ -5522,7 +5522,7 @@ function kn(e) {
|
|
|
5522
5522
|
for (this.expect(o.braceL); this.type !== o.braceR;) if (this.match(m.at)) c.push(this.parseDecorator());
|
|
5523
5523
|
else {
|
|
5524
5524
|
var l = this.parseClassElement(e.superClass !== null);
|
|
5525
|
-
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" &&
|
|
5525
|
+
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"));
|
|
5526
5526
|
}
|
|
5527
5527
|
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");
|
|
5528
5528
|
} finally {
|
|
@@ -5533,9 +5533,9 @@ function kn(e) {
|
|
|
5533
5533
|
return e && (t.typeParameters = e), t;
|
|
5534
5534
|
}, C.parseMethod = function(e, t, n, r, i) {
|
|
5535
5535
|
var a = this.startNode(), s = this.yieldPos, c = this.awaitPos, l = this.awaitIdentPos;
|
|
5536
|
-
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 |
|
|
5536
|
+
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) {
|
|
5537
5537
|
var u = i.key;
|
|
5538
|
-
this.raise(i.start,
|
|
5538
|
+
this.raise(i.start, H.AbstractMethodHasImplementation({ methodName: u.type !== "Identifier" || i.computed ? "[" + this.input.slice(u.start, u.end) + "]" : u.name }));
|
|
5539
5539
|
}
|
|
5540
5540
|
return this.finishNode(a, "FunctionExpression");
|
|
5541
5541
|
}, t.parse = function(e, t) {
|
|
@@ -5572,7 +5572,7 @@ function kn(e) {
|
|
|
5572
5572
|
ne(this.type) ? (c = !0, s = d, i = n ? this.parseIdent() : this.parseModuleExportName(), l = !1) : (i = f, l = !1);
|
|
5573
5573
|
} else ne(this.type) ? (l = !1, i = n ? this.parseIdent() : this.parseModuleExportName()) : (c = !0, s = d);
|
|
5574
5574
|
} else ne(this.type) && (c = !0, n ? (s = e.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(s)) : s = this.parseModuleExportName());
|
|
5575
|
-
c && r && this.raise(u, n ?
|
|
5575
|
+
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);
|
|
5576
5576
|
}, C.raiseCommonCheck = function(t, n, r) {
|
|
5577
5577
|
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);
|
|
5578
5578
|
}, C.raiseRecoverable = function(e, t) {
|
|
@@ -5599,11 +5599,11 @@ function kn(e) {
|
|
|
5599
5599
|
for (r.attributes = []; this.type !== o.slash && this.type !== m.jsxTagEnd;) r.attributes.push(this.jsx_parseAttribute());
|
|
5600
5600
|
return r.selfClosing = this.eat(o.slash), this.expect(m.jsxTagEnd), this.finishNode(r, i ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5601
5601
|
}, C.enterScope = function(t) {
|
|
5602
|
-
t ===
|
|
5602
|
+
t === pn && this.importsStack.push([]), e.prototype.enterScope.call(this, t);
|
|
5603
5603
|
var n = e.prototype.currentScope.call(this);
|
|
5604
5604
|
n.types = [], n.enums = [], n.constEnums = [], n.classes = [], n.exportOnlyBindings = [];
|
|
5605
5605
|
}, C.exitScope = function() {
|
|
5606
|
-
e.prototype.currentScope.call(this).flags ===
|
|
5606
|
+
e.prototype.currentScope.call(this).flags === pn && this.importsStack.pop(), e.prototype.exitScope.call(this);
|
|
5607
5607
|
}, C.hasImport = function(e, t) {
|
|
5608
5608
|
var n = this.importsStack.length;
|
|
5609
5609
|
if (this.importsStack[n - 1].indexOf(e) > -1) return !0;
|
|
@@ -5641,13 +5641,13 @@ function kn(e) {
|
|
|
5641
5641
|
get: function() {
|
|
5642
5642
|
return i;
|
|
5643
5643
|
}
|
|
5644
|
-
}]) &&
|
|
5644
|
+
}]) && an(u.prototype, x), S && an(u, S), Object.defineProperty(u, "prototype", { writable: !1 }), t;
|
|
5645
5645
|
}(t);
|
|
5646
5646
|
};
|
|
5647
5647
|
}
|
|
5648
5648
|
//#endregion
|
|
5649
5649
|
//#region src/utilities/index.ts
|
|
5650
|
-
var
|
|
5650
|
+
var jn = [
|
|
5651
5651
|
{
|
|
5652
5652
|
idPrefix: "dpuse-app",
|
|
5653
5653
|
typeId: "app",
|
|
@@ -5726,9 +5726,9 @@ var An = [
|
|
|
5726
5726
|
publishedTo: "npm",
|
|
5727
5727
|
uploadGroupName: void 0
|
|
5728
5728
|
}
|
|
5729
|
-
],
|
|
5730
|
-
async function
|
|
5731
|
-
e !== void 0 &&
|
|
5729
|
+
], Mn = r(i);
|
|
5730
|
+
async function Nn(e, r) {
|
|
5731
|
+
e !== void 0 && q(`${e} - clear(${r})`);
|
|
5732
5732
|
let i;
|
|
5733
5733
|
try {
|
|
5734
5734
|
i = await t.readdir(r, { withFileTypes: !0 });
|
|
@@ -5748,16 +5748,16 @@ async function Mn(e, r) {
|
|
|
5748
5748
|
}
|
|
5749
5749
|
}));
|
|
5750
5750
|
}
|
|
5751
|
-
async function
|
|
5751
|
+
async function Pn(e, n) {
|
|
5752
5752
|
return t.readdir(e, n);
|
|
5753
5753
|
}
|
|
5754
|
-
async function
|
|
5755
|
-
e !== void 0 &&
|
|
5756
|
-
let { stdout: a, stderr: o } = await
|
|
5754
|
+
async function Fn(e, n, r, i) {
|
|
5755
|
+
e !== void 0 && q(`${e} - exec(${n} ${r.join(" ")})`);
|
|
5756
|
+
let { stdout: a, stderr: o } = await Mn(n, r);
|
|
5757
5757
|
i === void 0 ? a.trim() && console.log(a.trim()) : await t.writeFile(i, a.trim(), "utf8"), o.trim() && console.error(o.trim());
|
|
5758
5758
|
}
|
|
5759
|
-
async function
|
|
5760
|
-
return
|
|
5759
|
+
async function In(e, t, n, r = !1, i = !1) {
|
|
5760
|
+
return q(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
5761
5761
|
a(t, n, {
|
|
5762
5762
|
shell: i,
|
|
5763
5763
|
stdio: "inherit"
|
|
@@ -5766,8 +5766,8 @@ async function Fn(e, t, n, r = !1, i = !1) {
|
|
|
5766
5766
|
});
|
|
5767
5767
|
});
|
|
5768
5768
|
}
|
|
5769
|
-
async function
|
|
5770
|
-
return
|
|
5769
|
+
async function Ln(e, n, r, i, o = !1) {
|
|
5770
|
+
return q(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
|
|
5771
5771
|
let c = a(n, r, {
|
|
5772
5772
|
shell: !1,
|
|
5773
5773
|
stdio: [
|
|
@@ -5789,50 +5789,50 @@ async function In(e, n, r, i, o = !1) {
|
|
|
5789
5789
|
});
|
|
5790
5790
|
});
|
|
5791
5791
|
}
|
|
5792
|
-
async function
|
|
5792
|
+
async function U(e) {
|
|
5793
5793
|
return JSON.parse(await t.readFile(e, "utf8"));
|
|
5794
5794
|
}
|
|
5795
|
-
async function
|
|
5795
|
+
async function W(e) {
|
|
5796
5796
|
return await t.readFile(e, "utf8");
|
|
5797
5797
|
}
|
|
5798
|
-
async function
|
|
5798
|
+
async function Rn(e) {
|
|
5799
5799
|
try {
|
|
5800
5800
|
await t.unlink(e);
|
|
5801
5801
|
} catch (e) {
|
|
5802
5802
|
if (e.code !== "ENOENT") throw e;
|
|
5803
5803
|
}
|
|
5804
5804
|
}
|
|
5805
|
-
async function
|
|
5805
|
+
async function zn(e, n) {
|
|
5806
5806
|
await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
|
|
5807
5807
|
}
|
|
5808
|
-
async function
|
|
5808
|
+
async function Bn(e, n) {
|
|
5809
5809
|
await t.writeFile(e, n, "utf8");
|
|
5810
5810
|
}
|
|
5811
|
-
function
|
|
5811
|
+
function G(e) {
|
|
5812
5812
|
let t = "────────────────────────────────────────────────────────────────────────────────";
|
|
5813
5813
|
console.info(`\n[36m${t}`), console.info(`▶️ ${e}`), console.info(`${t}[0m`);
|
|
5814
5814
|
}
|
|
5815
|
-
function
|
|
5815
|
+
function K(e) {
|
|
5816
5816
|
console.info(`\n✅ ${e}\n`);
|
|
5817
5817
|
}
|
|
5818
|
-
function
|
|
5818
|
+
function q(e) {
|
|
5819
5819
|
console.info(`\n${e}\n`);
|
|
5820
5820
|
}
|
|
5821
|
-
function
|
|
5822
|
-
let t =
|
|
5821
|
+
function Vn(e) {
|
|
5822
|
+
let t = jn.find((t) => e.startsWith(t.idPrefix));
|
|
5823
5823
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
5824
5824
|
return t;
|
|
5825
5825
|
}
|
|
5826
|
-
async function
|
|
5826
|
+
async function Hn(e) {
|
|
5827
5827
|
return await t.stat(e);
|
|
5828
5828
|
}
|
|
5829
|
-
function
|
|
5830
|
-
let t = k.extend(
|
|
5829
|
+
function Un(e) {
|
|
5830
|
+
let t = k.extend(An()).parse(e, {
|
|
5831
5831
|
ecmaVersion: "latest",
|
|
5832
5832
|
sourceType: "module",
|
|
5833
5833
|
locations: !0
|
|
5834
5834
|
}), n = [];
|
|
5835
|
-
return
|
|
5835
|
+
return Wn(t, (e) => {
|
|
5836
5836
|
if (e.type !== "MethodDefinition") return;
|
|
5837
5837
|
let t = e, r = t.key;
|
|
5838
5838
|
if (r.type !== "Identifier") return;
|
|
@@ -5840,7 +5840,7 @@ function Hn(e) {
|
|
|
5840
5840
|
i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
|
|
5841
5841
|
}), n;
|
|
5842
5842
|
}
|
|
5843
|
-
function
|
|
5843
|
+
function Wn(e, t) {
|
|
5844
5844
|
t(e);
|
|
5845
5845
|
for (let [n, r] of Object.entries(e)) {
|
|
5846
5846
|
if ([
|
|
@@ -5853,12 +5853,12 @@ function Un(e, t) {
|
|
|
5853
5853
|
let e = r;
|
|
5854
5854
|
if (Array.isArray(e)) for (let n of e) {
|
|
5855
5855
|
let e = n;
|
|
5856
|
-
e && typeof e.type == "string" &&
|
|
5856
|
+
e && typeof e.type == "string" && Wn(e, t);
|
|
5857
5857
|
}
|
|
5858
|
-
else e && typeof e == "object" && typeof e.type == "string" &&
|
|
5858
|
+
else e && typeof e == "object" && typeof e.type == "string" && Wn(e, t);
|
|
5859
5859
|
}
|
|
5860
5860
|
}
|
|
5861
|
-
function
|
|
5861
|
+
function Gn(e, t, n, r) {
|
|
5862
5862
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
5863
5863
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
5864
5864
|
let o = t.trim();
|
|
@@ -5866,44 +5866,44 @@ function Wn(e, t, n, r) {
|
|
|
5866
5866
|
}
|
|
5867
5867
|
//#endregion
|
|
5868
5868
|
//#region src/actions/auditDependencies.ts
|
|
5869
|
-
async function
|
|
5869
|
+
async function Kn() {
|
|
5870
5870
|
try {
|
|
5871
|
-
|
|
5871
|
+
G("Audit Dependencies"), await In("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
|
|
5872
5872
|
} catch (e) {
|
|
5873
5873
|
console.error("❌ Error auditing dependencies", e), process.exit(1);
|
|
5874
5874
|
}
|
|
5875
5875
|
}
|
|
5876
5876
|
//#endregion
|
|
5877
5877
|
//#region src/actions/checkConfigFiles.ts
|
|
5878
|
-
async function
|
|
5878
|
+
async function qn() {
|
|
5879
5879
|
try {
|
|
5880
|
-
|
|
5881
|
-
let e =
|
|
5882
|
-
await
|
|
5880
|
+
G("Check configuration files"), q("1️⃣ Check individual files");
|
|
5881
|
+
let e = Vn((await U("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5882
|
+
await J(t, ".editorconfig"), await Jn(e, t), await J(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_npm_published" : ".gitignore_default"]), await J(t, ".markdownlint.json"), await J(t, ".ncurc.json"), await Yn(e, t), await J(t, "LICENSE"), await Xn(e, t), await J(t, "tsconfig.scripts.json"), await Zn(e, t), await Qn(e, t), K("Configuration files checked");
|
|
5883
5883
|
} catch (e) {
|
|
5884
5884
|
console.error("❌ Error checking configuration files", e), process.exit(1);
|
|
5885
5885
|
}
|
|
5886
5886
|
}
|
|
5887
|
-
async function qn(e, t) {
|
|
5888
|
-
["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await Y(t, ".gitattributes", [".gitattributes_default"]);
|
|
5889
|
-
}
|
|
5890
5887
|
async function Jn(e, t) {
|
|
5888
|
+
["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await J(t, ".gitattributes", [".gitattributes_default"]);
|
|
5889
|
+
}
|
|
5890
|
+
async function Yn(e, t) {
|
|
5891
5891
|
[
|
|
5892
5892
|
"app",
|
|
5893
5893
|
"api",
|
|
5894
5894
|
"development",
|
|
5895
5895
|
"eslint"
|
|
5896
|
-
].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await
|
|
5896
|
+
].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]);
|
|
5897
5897
|
}
|
|
5898
|
-
async function
|
|
5898
|
+
async function Xn(e, t) {
|
|
5899
5899
|
[
|
|
5900
5900
|
"connector",
|
|
5901
5901
|
"engine",
|
|
5902
5902
|
"shared",
|
|
5903
5903
|
"tool"
|
|
5904
|
-
].includes(e.typeId) ? await
|
|
5904
|
+
].includes(e.typeId) ? await J(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
|
|
5905
5905
|
}
|
|
5906
|
-
async function
|
|
5906
|
+
async function Zn(e, t) {
|
|
5907
5907
|
if (["eslint", "kb"].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
|
|
5908
5908
|
else if ([
|
|
5909
5909
|
"app",
|
|
@@ -5914,26 +5914,26 @@ async function Xn(e, t) {
|
|
|
5914
5914
|
].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is UNIQUE to this project");
|
|
5915
5915
|
else {
|
|
5916
5916
|
let n;
|
|
5917
|
-
n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await
|
|
5917
|
+
n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await J(t, "vite.config.ts", n);
|
|
5918
5918
|
}
|
|
5919
5919
|
}
|
|
5920
|
-
async function
|
|
5920
|
+
async function Qn(e, t) {
|
|
5921
5921
|
[
|
|
5922
5922
|
"app",
|
|
5923
5923
|
"api",
|
|
5924
5924
|
"eslint",
|
|
5925
5925
|
"kb"
|
|
5926
|
-
].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await
|
|
5926
|
+
].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await J(t, "vitest.config.ts");
|
|
5927
5927
|
}
|
|
5928
|
-
async function
|
|
5928
|
+
async function J(e, t, r = []) {
|
|
5929
5929
|
let i = n.resolve(process.cwd(), t), a = r.length > 0 ? r : [t], o;
|
|
5930
5930
|
try {
|
|
5931
|
-
o = await
|
|
5931
|
+
o = await W(i);
|
|
5932
5932
|
} catch (e) {
|
|
5933
5933
|
if (e.code !== "ENOENT") throw e;
|
|
5934
5934
|
}
|
|
5935
5935
|
for (let r of a) {
|
|
5936
|
-
let i = await
|
|
5936
|
+
let i = await W(n.resolve(e, `../${r}`));
|
|
5937
5937
|
if (o === i) {
|
|
5938
5938
|
console.info(`ℹ️ File '${t.split("_", 1)[0] ?? t}' is the same as '${r}'`);
|
|
5939
5939
|
return;
|
|
@@ -5943,12 +5943,12 @@ async function Y(e, t, r = []) {
|
|
|
5943
5943
|
}
|
|
5944
5944
|
//#endregion
|
|
5945
5945
|
//#region src/actions/checkDependencies.ts
|
|
5946
|
-
async function
|
|
5946
|
+
async function $n() {
|
|
5947
5947
|
try {
|
|
5948
|
-
|
|
5948
|
+
G("Check Dependencies"), await In("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'");
|
|
5949
5949
|
let e = {};
|
|
5950
5950
|
try {
|
|
5951
|
-
e = await
|
|
5951
|
+
e = await U(n.resolve(process.cwd(), ".ncurc.json"));
|
|
5952
5952
|
} catch (e) {
|
|
5953
5953
|
if (e.code !== "ENOENT") throw e;
|
|
5954
5954
|
}
|
|
@@ -5958,85 +5958,85 @@ async function Qn() {
|
|
|
5958
5958
|
dep: "dev,prod,peer,optional",
|
|
5959
5959
|
install: "never",
|
|
5960
5960
|
...e
|
|
5961
|
-
}), await
|
|
5961
|
+
}), await In("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked");
|
|
5962
5962
|
} catch (e) {
|
|
5963
5963
|
console.error("❌ Error checking dependencies", e), process.exit(1);
|
|
5964
5964
|
}
|
|
5965
5965
|
}
|
|
5966
5966
|
//#endregion
|
|
5967
5967
|
//#region src/actions/documentBundleSizes.ts
|
|
5968
|
-
var
|
|
5969
|
-
async function
|
|
5968
|
+
var er = "<!-- BUNDLE_START -->", tr = "<!-- BUNDLE_END -->", nr = " ", rr = 20, ir = "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._";
|
|
5969
|
+
async function ar(e) {
|
|
5970
5970
|
try {
|
|
5971
|
-
|
|
5972
|
-
let t = await
|
|
5973
|
-
|
|
5974
|
-
let n =
|
|
5975
|
-
await
|
|
5971
|
+
G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
|
|
5972
|
+
let t = await U("./bundle-analysis-reports/sonda/index.json");
|
|
5973
|
+
q("2️⃣ Insert table into 'README.md'");
|
|
5974
|
+
let n = or(t, e?.moduleLevel ?? !1);
|
|
5975
|
+
await Bn("README.md", Gn(await W("./README.md"), `\n${ir}\n\n${n}\n`, er, tr)), K("Bundle sizes documented");
|
|
5976
5976
|
} catch (e) {
|
|
5977
5977
|
console.error("❌ Error documenting bundle sizes", e), process.exit(1);
|
|
5978
5978
|
}
|
|
5979
5979
|
}
|
|
5980
|
-
function
|
|
5981
|
-
let n =
|
|
5980
|
+
function or(e, t) {
|
|
5981
|
+
let n = fr(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, gr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
|
|
5982
5982
|
for (let [e, o] of i) {
|
|
5983
|
-
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ?
|
|
5983
|
+
let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? sr(e, o, ur(i), r, t) : cr(e, o, i, r, t);
|
|
5984
5984
|
a.push(...s);
|
|
5985
5985
|
}
|
|
5986
5986
|
return a.join("\n");
|
|
5987
5987
|
}
|
|
5988
|
-
function
|
|
5988
|
+
function sr(e, t, n, r, i) {
|
|
5989
5989
|
let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
|
|
5990
|
-
if (s.size === 1) return [`| ${e} → ${a} → ${
|
|
5991
|
-
let l = [`| ${e} → ${a} | ${
|
|
5992
|
-
return i || l.push(...
|
|
5990
|
+
if (s.size === 1) return [`| ${e} → ${a} → ${dr(s)} | ${_r(t)} · ${vr(c)} |`];
|
|
5991
|
+
let l = [`| ${e} → ${a} | ${_r(t)} · ${vr(c)} |`];
|
|
5992
|
+
return i || l.push(...lr(s, nr, r)), l;
|
|
5993
5993
|
}
|
|
5994
|
-
function
|
|
5995
|
-
let a = [`| ${e} | ${
|
|
5994
|
+
function cr(e, t, n, r, i) {
|
|
5995
|
+
let a = [`| ${e} | ${_r(t)} |`];
|
|
5996
5996
|
for (let [e, { sizes: t, files: o }] of n) {
|
|
5997
5997
|
let n = r > 0 ? t.uncompressed / r * 100 : 0;
|
|
5998
5998
|
if (o.size === 1) {
|
|
5999
|
-
let t =
|
|
6000
|
-
a.push(`| ${
|
|
5999
|
+
let t = dr(o);
|
|
6000
|
+
a.push(`| ${nr}${e} → ${t} | ${vr(n)} |`);
|
|
6001
6001
|
continue;
|
|
6002
6002
|
}
|
|
6003
|
-
a.push(`| ${
|
|
6003
|
+
a.push(`| ${nr}${e} | ${vr(n)} |`), i || a.push(...lr(o, `${nr}${nr}`, r));
|
|
6004
6004
|
}
|
|
6005
6005
|
return a;
|
|
6006
6006
|
}
|
|
6007
|
-
function
|
|
6008
|
-
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${
|
|
6007
|
+
function lr(e, t, n) {
|
|
6008
|
+
return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${vr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
|
|
6009
6009
|
}
|
|
6010
|
-
function
|
|
6010
|
+
function ur(e) {
|
|
6011
6011
|
let [t] = e;
|
|
6012
6012
|
if (t === void 0) throw Error("Expected exactly one entry");
|
|
6013
6013
|
return t;
|
|
6014
6014
|
}
|
|
6015
|
-
function
|
|
6015
|
+
function dr(e) {
|
|
6016
6016
|
let [t] = e.keys();
|
|
6017
6017
|
if (t === void 0) throw Error("Expected exactly one file");
|
|
6018
6018
|
return t;
|
|
6019
6019
|
}
|
|
6020
|
-
function
|
|
6021
|
-
let t =
|
|
6020
|
+
function fr(e) {
|
|
6021
|
+
let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
|
|
6022
6022
|
for (let r of e.resources) {
|
|
6023
6023
|
if (r.kind !== "chunk" || !r.parent) continue;
|
|
6024
|
-
let { group: e, file: i } =
|
|
6024
|
+
let { group: e, file: i } = mr(r.name, t), a = gr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
|
|
6025
6025
|
n.set(r.parent, o);
|
|
6026
6026
|
let s = o.get(e) ?? {
|
|
6027
|
-
sizes:
|
|
6027
|
+
sizes: yr(),
|
|
6028
6028
|
files: /* @__PURE__ */ new Map()
|
|
6029
6029
|
};
|
|
6030
|
-
o.set(e, s),
|
|
6031
|
-
let c = s.files.get(i) ??
|
|
6032
|
-
s.files.set(i, c),
|
|
6030
|
+
o.set(e, s), br(s.sizes, a);
|
|
6031
|
+
let c = s.files.get(i) ?? yr();
|
|
6032
|
+
s.files.set(i, c), br(c, a);
|
|
6033
6033
|
}
|
|
6034
6034
|
return n;
|
|
6035
6035
|
}
|
|
6036
|
-
function
|
|
6036
|
+
function pr(e) {
|
|
6037
6037
|
return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
|
|
6038
6038
|
}
|
|
6039
|
-
function
|
|
6039
|
+
function mr(e, t) {
|
|
6040
6040
|
let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
|
|
6041
6041
|
if (n) {
|
|
6042
6042
|
let [t, r] = n;
|
|
@@ -6053,52 +6053,52 @@ function pr(e, t) {
|
|
|
6053
6053
|
file: e.slice(1)
|
|
6054
6054
|
} : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
|
|
6055
6055
|
group: "wasm",
|
|
6056
|
-
file:
|
|
6056
|
+
file: hr(e)
|
|
6057
6057
|
} : {
|
|
6058
6058
|
group: "src",
|
|
6059
|
-
file:
|
|
6059
|
+
file: hr(e)
|
|
6060
6060
|
};
|
|
6061
6061
|
}
|
|
6062
|
-
function
|
|
6062
|
+
function hr(e) {
|
|
6063
6063
|
return e.split("/").at(-1) ?? e;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function gr(e) {
|
|
6066
6066
|
return {
|
|
6067
6067
|
uncompressed: e.uncompressed,
|
|
6068
6068
|
brotli: e.brotli ?? 0
|
|
6069
6069
|
};
|
|
6070
6070
|
}
|
|
6071
|
-
function gr(e) {
|
|
6072
|
-
return `${br(e.uncompressed)} · brotli ${br(e.brotli)}`;
|
|
6073
|
-
}
|
|
6074
6071
|
function _r(e) {
|
|
6075
|
-
|
|
6076
|
-
return `\`${"█".repeat(t)}${"░".repeat(nr - t)}\` ${e.toFixed(1)}%`;
|
|
6072
|
+
return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
|
|
6077
6073
|
}
|
|
6078
|
-
function vr() {
|
|
6074
|
+
function vr(e) {
|
|
6075
|
+
let t = Math.round(e / 100 * rr);
|
|
6076
|
+
return `\`${"█".repeat(t)}${"░".repeat(rr - t)}\` ${e.toFixed(1)}%`;
|
|
6077
|
+
}
|
|
6078
|
+
function yr() {
|
|
6079
6079
|
return {
|
|
6080
6080
|
uncompressed: 0,
|
|
6081
6081
|
brotli: 0
|
|
6082
6082
|
};
|
|
6083
6083
|
}
|
|
6084
|
-
function
|
|
6084
|
+
function br(e, t) {
|
|
6085
6085
|
e.uncompressed += t.uncompressed, e.brotli += t.brotli;
|
|
6086
6086
|
}
|
|
6087
|
-
function
|
|
6087
|
+
function xr(e) {
|
|
6088
6088
|
return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
|
|
6089
6089
|
}
|
|
6090
6090
|
//#endregion
|
|
6091
6091
|
//#region src/actions/documentDependencies.ts
|
|
6092
|
-
var
|
|
6093
|
-
async function
|
|
6092
|
+
var Sr = "<!-- DEPENDENCY_LICENSES_START -->", Cr = "<!-- DEPENDENCY_LICENSES_END -->", wr = "<!-- DEPENDENCY_TREE_START -->", Tr = "<!-- DEPENDENCY_TREE_END -->", Er = "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.";
|
|
6093
|
+
async function Dr(e = "MIT") {
|
|
6094
6094
|
try {
|
|
6095
|
-
|
|
6096
|
-
let t = await
|
|
6095
|
+
G("Document Dependencies");
|
|
6096
|
+
let t = await U("package.json");
|
|
6097
6097
|
if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
|
|
6098
|
-
await
|
|
6098
|
+
await Or(t.name), K("Dependencies documented");
|
|
6099
6099
|
return;
|
|
6100
6100
|
}
|
|
6101
|
-
await
|
|
6101
|
+
await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
|
|
6102
6102
|
c({
|
|
6103
6103
|
start: process.cwd(),
|
|
6104
6104
|
production: !0,
|
|
@@ -6112,43 +6112,43 @@ async function Er(e = "MIT") {
|
|
|
6112
6112
|
}, (e) => {
|
|
6113
6113
|
e == null ? n() : r(e);
|
|
6114
6114
|
});
|
|
6115
|
-
}), await
|
|
6115
|
+
}), await Ln("3️⃣ Identify transitive dependencies", "npm", [
|
|
6116
6116
|
"ls",
|
|
6117
6117
|
"--all",
|
|
6118
6118
|
"--json",
|
|
6119
6119
|
"--omit=dev"
|
|
6120
|
-
], "licenses/licenseTree.json"), await
|
|
6120
|
+
], "licenses/licenseTree.json"), await kr("4️⃣ ", e), K("Dependencies documented");
|
|
6121
6121
|
} catch (e) {
|
|
6122
6122
|
console.error("❌ Error documenting dependencies", e), process.exit(1);
|
|
6123
6123
|
}
|
|
6124
6124
|
}
|
|
6125
|
-
async function
|
|
6126
|
-
|
|
6125
|
+
async function Or(e) {
|
|
6126
|
+
q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
|
|
6127
6127
|
let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
|
|
6128
|
-
await
|
|
6128
|
+
await Bn("README.md", Gn(Gn(await W("./README.md"), t, Sr, Cr), "", wr, Tr));
|
|
6129
6129
|
}
|
|
6130
|
-
async function
|
|
6131
|
-
|
|
6132
|
-
let [n, r] = await Promise.all([
|
|
6133
|
-
for (let [e, t] of Object.entries(n)) i.set(e,
|
|
6130
|
+
async function kr(e, t) {
|
|
6131
|
+
q(`${e} Insert licenses into 'README.md'`);
|
|
6132
|
+
let [n, r] = await Promise.all([U("licenses/licenses.json"), U("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
|
|
6133
|
+
for (let [e, t] of Object.entries(n)) i.set(e, Mr(e, t));
|
|
6134
6134
|
await Promise.all(i.values().map(async (e) => {
|
|
6135
|
-
let t = await
|
|
6135
|
+
let t = await Nr(e.name, e.installedVersion);
|
|
6136
6136
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6137
6137
|
}));
|
|
6138
|
-
let a = `${
|
|
6139
|
-
for (let e of i.values()) a +=
|
|
6138
|
+
let a = `${Ar(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
|
|
6139
|
+
for (let e of i.values()) a += Pr(e);
|
|
6140
6140
|
let o = [];
|
|
6141
|
-
r.dependencies != null &&
|
|
6142
|
-
let s = `${
|
|
6143
|
-
await
|
|
6144
|
-
}
|
|
6145
|
-
function kr(e) {
|
|
6146
|
-
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 ${Ar(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.`;
|
|
6141
|
+
r.dependencies != null && Fr(r.dependencies, i, o, 0);
|
|
6142
|
+
let s = `${Er}\n\n${o.join("\n")}`;
|
|
6143
|
+
await Bn("README.md", Gn(Gn(await W("./README.md"), a, Sr, Cr), s, wr, Tr));
|
|
6147
6144
|
}
|
|
6148
6145
|
function Ar(e) {
|
|
6146
|
+
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.`;
|
|
6147
|
+
}
|
|
6148
|
+
function jr(e) {
|
|
6149
6149
|
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))}`;
|
|
6150
6150
|
}
|
|
6151
|
-
function
|
|
6151
|
+
function Mr(e, t) {
|
|
6152
6152
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6153
6153
|
return {
|
|
6154
6154
|
name: r,
|
|
@@ -6162,7 +6162,7 @@ function jr(e, t) {
|
|
|
6162
6162
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6163
6163
|
};
|
|
6164
6164
|
}
|
|
6165
|
-
async function
|
|
6165
|
+
async function Nr(e, t) {
|
|
6166
6166
|
try {
|
|
6167
6167
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6168
6168
|
if (n.ok) {
|
|
@@ -6180,25 +6180,25 @@ async function Mr(e, t) {
|
|
|
6180
6180
|
publishedDate: ""
|
|
6181
6181
|
};
|
|
6182
6182
|
}
|
|
6183
|
-
function
|
|
6183
|
+
function Pr(e) {
|
|
6184
6184
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6185
6185
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6186
6186
|
}
|
|
6187
|
-
function
|
|
6187
|
+
function Fr(e, t, n, r) {
|
|
6188
6188
|
let i = " ".repeat(r);
|
|
6189
6189
|
for (let [a, o] of Object.entries(e)) {
|
|
6190
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6191
|
-
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null &&
|
|
6190
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Ir(s);
|
|
6191
|
+
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Fr(o.dependencies, t, n, r + 1);
|
|
6192
6192
|
}
|
|
6193
6193
|
}
|
|
6194
|
-
function
|
|
6194
|
+
function Ir(e) {
|
|
6195
6195
|
if (e == null) return "";
|
|
6196
|
-
let t = e.publishedDate ?
|
|
6196
|
+
let t = e.publishedDate ? Lr(e.publishedDate.split("T", 1)[0]) : "";
|
|
6197
6197
|
if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
|
|
6198
|
-
let n = e.latestPublishedDate ?
|
|
6198
|
+
let n = e.latestPublishedDate ? Lr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
|
|
6199
6199
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6200
6200
|
}
|
|
6201
|
-
function
|
|
6201
|
+
function Lr(e) {
|
|
6202
6202
|
if (e == null || e === "") return "n/a";
|
|
6203
6203
|
let t = e.split("T", 1)[0];
|
|
6204
6204
|
if (t == null || t === "") return "n/a";
|
|
@@ -6207,17 +6207,17 @@ function Ir(e) {
|
|
|
6207
6207
|
}
|
|
6208
6208
|
//#endregion
|
|
6209
6209
|
//#region src/actions/documentGovernance.ts
|
|
6210
|
-
var
|
|
6211
|
-
async function
|
|
6210
|
+
var Rr = "<!-- GOVERNANCE_START -->", zr = "<!-- GOVERNANCE_END -->";
|
|
6211
|
+
async function Br() {
|
|
6212
6212
|
try {
|
|
6213
|
-
|
|
6214
|
-
let [e, t] = await Promise.all([
|
|
6215
|
-
await
|
|
6213
|
+
G("Document Governance"), q("1️⃣ Insert governance content into 'README.md'");
|
|
6214
|
+
let [e, t] = await Promise.all([U("package.json"), U("config.json")]), { owner: n, repo: r } = Vr(e), i = Wr(n, r, Hr(e), Ur(t.firstCreatedAt));
|
|
6215
|
+
await Bn("README.md", Gn(await W("./README.md"), i, Rr, zr)), K("Governance documented");
|
|
6216
6216
|
} catch (e) {
|
|
6217
6217
|
console.error("❌ Error documenting governance", e), process.exit(1);
|
|
6218
6218
|
}
|
|
6219
6219
|
}
|
|
6220
|
-
function
|
|
6220
|
+
function Vr(e) {
|
|
6221
6221
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6222
6222
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
|
|
6223
6223
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6227,18 +6227,18 @@ function Br(e) {
|
|
|
6227
6227
|
repo: i[2]
|
|
6228
6228
|
};
|
|
6229
6229
|
}
|
|
6230
|
-
function
|
|
6230
|
+
function Hr(e) {
|
|
6231
6231
|
let t = e.author, n = typeof t == "string" ? t : t?.name;
|
|
6232
6232
|
if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
|
|
6233
6233
|
return n.replace(/\s*<[^>]*>\s*/, "").trim();
|
|
6234
6234
|
}
|
|
6235
|
-
function
|
|
6235
|
+
function Ur(e) {
|
|
6236
6236
|
let t = (/* @__PURE__ */ new Date()).getFullYear();
|
|
6237
6237
|
if (e == null) return String(t);
|
|
6238
6238
|
let n = new Date(e).getFullYear();
|
|
6239
6239
|
return n === t ? String(t) : `${String(n)}-present`;
|
|
6240
6240
|
}
|
|
6241
|
-
function
|
|
6241
|
+
function Wr(e, t, n, r) {
|
|
6242
6242
|
let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
|
|
6243
6243
|
return `## Security & Quality
|
|
6244
6244
|
|
|
@@ -6285,43 +6285,43 @@ This project is licensed under the MIT License, permitting free use, modificatio
|
|
|
6285
6285
|
}
|
|
6286
6286
|
//#endregion
|
|
6287
6287
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DzuoA1f0.js
|
|
6288
|
-
var
|
|
6288
|
+
var Gr, Kr = {
|
|
6289
6289
|
lang: void 0,
|
|
6290
6290
|
message: void 0,
|
|
6291
6291
|
abortEarly: void 0,
|
|
6292
6292
|
abortPipeEarly: void 0
|
|
6293
6293
|
};
|
|
6294
6294
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6295
|
-
function
|
|
6296
|
-
return !e && !
|
|
6297
|
-
lang: e?.lang ??
|
|
6295
|
+
function qr(e) {
|
|
6296
|
+
return !e && !Gr ? Kr : {
|
|
6297
|
+
lang: e?.lang ?? Gr?.lang,
|
|
6298
6298
|
message: e?.message,
|
|
6299
|
-
abortEarly: e?.abortEarly ??
|
|
6300
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
6299
|
+
abortEarly: e?.abortEarly ?? Gr?.abortEarly,
|
|
6300
|
+
abortPipeEarly: e?.abortPipeEarly ?? Gr?.abortPipeEarly
|
|
6301
6301
|
};
|
|
6302
6302
|
}
|
|
6303
|
-
var
|
|
6303
|
+
var Jr;
|
|
6304
6304
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6305
|
-
function
|
|
6306
|
-
return
|
|
6305
|
+
function Yr(e) {
|
|
6306
|
+
return Jr?.get(e);
|
|
6307
6307
|
}
|
|
6308
|
-
var
|
|
6308
|
+
var Xr;
|
|
6309
6309
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6310
|
-
function
|
|
6311
|
-
return
|
|
6310
|
+
function Zr(e) {
|
|
6311
|
+
return Xr?.get(e);
|
|
6312
6312
|
}
|
|
6313
|
-
var
|
|
6313
|
+
var Qr;
|
|
6314
6314
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6315
|
-
function
|
|
6316
|
-
return
|
|
6315
|
+
function $r(e, t) {
|
|
6316
|
+
return Qr?.get(e)?.get(t);
|
|
6317
6317
|
}
|
|
6318
6318
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6319
|
-
function
|
|
6319
|
+
function ei(e) {
|
|
6320
6320
|
let t = typeof e;
|
|
6321
6321
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6322
6322
|
}
|
|
6323
|
-
function
|
|
6324
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
6323
|
+
function ti(e, t, n, r, i) {
|
|
6324
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ ei(a), c = {
|
|
6325
6325
|
kind: e.kind,
|
|
6326
6326
|
type: e.type,
|
|
6327
6327
|
input: a,
|
|
@@ -6334,50 +6334,50 @@ function ei(e, t, n, r, i) {
|
|
|
6334
6334
|
lang: r.lang,
|
|
6335
6335
|
abortEarly: r.abortEarly,
|
|
6336
6336
|
abortPipeEarly: r.abortPipeEarly
|
|
6337
|
-
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */
|
|
6337
|
+
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ $r(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Zr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Yr(c.lang);
|
|
6338
6338
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
6339
6339
|
}
|
|
6340
|
-
var
|
|
6340
|
+
var ni = /* @__PURE__ */ new WeakMap();
|
|
6341
6341
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6342
|
-
function
|
|
6343
|
-
let t =
|
|
6342
|
+
function Y(e) {
|
|
6343
|
+
let t = ni.get(e);
|
|
6344
6344
|
return t || (t = {
|
|
6345
6345
|
version: 1,
|
|
6346
6346
|
vendor: "valibot",
|
|
6347
6347
|
validate(t) {
|
|
6348
|
-
return e["~run"]({ value: t }, /* @__PURE__ */
|
|
6348
|
+
return e["~run"]({ value: t }, /* @__PURE__ */ qr());
|
|
6349
6349
|
}
|
|
6350
|
-
},
|
|
6350
|
+
}, ni.set(e, t)), t;
|
|
6351
6351
|
}
|
|
6352
6352
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6353
|
-
function
|
|
6353
|
+
function ri(e, t) {
|
|
6354
6354
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6355
6355
|
}
|
|
6356
6356
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6357
|
-
function
|
|
6357
|
+
function ii(e, t) {
|
|
6358
6358
|
let n = [...new Set(e)];
|
|
6359
6359
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6360
6360
|
}
|
|
6361
6361
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6362
|
-
function
|
|
6362
|
+
function ai(e, t, n) {
|
|
6363
6363
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6364
6364
|
}
|
|
6365
6365
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6366
|
-
function
|
|
6366
|
+
function oi(e, t, n) {
|
|
6367
6367
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6368
6368
|
}
|
|
6369
6369
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6370
|
-
function
|
|
6370
|
+
function si(e, t) {
|
|
6371
6371
|
return {
|
|
6372
6372
|
kind: "schema",
|
|
6373
6373
|
type: "array",
|
|
6374
|
-
reference:
|
|
6374
|
+
reference: si,
|
|
6375
6375
|
expects: "Array",
|
|
6376
6376
|
async: !1,
|
|
6377
6377
|
item: e,
|
|
6378
6378
|
message: t,
|
|
6379
6379
|
get "~standard"() {
|
|
6380
|
-
return /* @__PURE__ */
|
|
6380
|
+
return /* @__PURE__ */ Y(this);
|
|
6381
6381
|
},
|
|
6382
6382
|
"~run"(e, t) {
|
|
6383
6383
|
let n = e.value;
|
|
@@ -6401,93 +6401,93 @@ function oi(e, t) {
|
|
|
6401
6401
|
}
|
|
6402
6402
|
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
6403
6403
|
}
|
|
6404
|
-
} else
|
|
6404
|
+
} else ti(this, "type", e, t);
|
|
6405
6405
|
return e;
|
|
6406
6406
|
}
|
|
6407
6407
|
};
|
|
6408
6408
|
}
|
|
6409
6409
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6410
|
-
function
|
|
6410
|
+
function ci(e) {
|
|
6411
6411
|
return {
|
|
6412
6412
|
kind: "schema",
|
|
6413
6413
|
type: "boolean",
|
|
6414
|
-
reference:
|
|
6414
|
+
reference: ci,
|
|
6415
6415
|
expects: "boolean",
|
|
6416
6416
|
async: !1,
|
|
6417
6417
|
message: e,
|
|
6418
6418
|
get "~standard"() {
|
|
6419
|
-
return /* @__PURE__ */
|
|
6419
|
+
return /* @__PURE__ */ Y(this);
|
|
6420
6420
|
},
|
|
6421
6421
|
"~run"(e, t) {
|
|
6422
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
6422
|
+
return typeof e.value == "boolean" ? e.typed = !0 : ti(this, "type", e, t), e;
|
|
6423
6423
|
}
|
|
6424
6424
|
};
|
|
6425
6425
|
}
|
|
6426
6426
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6427
|
-
function
|
|
6427
|
+
function li(e, t) {
|
|
6428
6428
|
return {
|
|
6429
6429
|
kind: "schema",
|
|
6430
6430
|
type: "literal",
|
|
6431
|
-
reference:
|
|
6432
|
-
expects: /* @__PURE__ */
|
|
6431
|
+
reference: li,
|
|
6432
|
+
expects: /* @__PURE__ */ ei(e),
|
|
6433
6433
|
async: !1,
|
|
6434
6434
|
literal: e,
|
|
6435
6435
|
message: t,
|
|
6436
6436
|
get "~standard"() {
|
|
6437
|
-
return /* @__PURE__ */
|
|
6437
|
+
return /* @__PURE__ */ Y(this);
|
|
6438
6438
|
},
|
|
6439
6439
|
"~run"(e, t) {
|
|
6440
|
-
return e.value === this.literal ? e.typed = !0 :
|
|
6440
|
+
return e.value === this.literal ? e.typed = !0 : ti(this, "type", e, t), e;
|
|
6441
6441
|
}
|
|
6442
6442
|
};
|
|
6443
6443
|
}
|
|
6444
6444
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6445
|
-
function
|
|
6445
|
+
function X(e, t) {
|
|
6446
6446
|
return {
|
|
6447
6447
|
kind: "schema",
|
|
6448
6448
|
type: "nullable",
|
|
6449
|
-
reference:
|
|
6449
|
+
reference: X,
|
|
6450
6450
|
expects: `(${e.expects} | null)`,
|
|
6451
6451
|
async: !1,
|
|
6452
6452
|
wrapped: e,
|
|
6453
6453
|
default: t,
|
|
6454
6454
|
get "~standard"() {
|
|
6455
|
-
return /* @__PURE__ */
|
|
6455
|
+
return /* @__PURE__ */ Y(this);
|
|
6456
6456
|
},
|
|
6457
6457
|
"~run"(e, t) {
|
|
6458
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6458
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ oi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6459
6459
|
}
|
|
6460
6460
|
};
|
|
6461
6461
|
}
|
|
6462
6462
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6463
|
-
function
|
|
6463
|
+
function ui(e) {
|
|
6464
6464
|
return {
|
|
6465
6465
|
kind: "schema",
|
|
6466
6466
|
type: "number",
|
|
6467
|
-
reference:
|
|
6467
|
+
reference: ui,
|
|
6468
6468
|
expects: "number",
|
|
6469
6469
|
async: !1,
|
|
6470
6470
|
message: e,
|
|
6471
6471
|
get "~standard"() {
|
|
6472
|
-
return /* @__PURE__ */
|
|
6472
|
+
return /* @__PURE__ */ Y(this);
|
|
6473
6473
|
},
|
|
6474
6474
|
"~run"(e, t) {
|
|
6475
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
6475
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : ti(this, "type", e, t), e;
|
|
6476
6476
|
}
|
|
6477
6477
|
};
|
|
6478
6478
|
}
|
|
6479
6479
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6480
|
-
function
|
|
6480
|
+
function Z(e, t) {
|
|
6481
6481
|
return {
|
|
6482
6482
|
kind: "schema",
|
|
6483
6483
|
type: "object",
|
|
6484
|
-
reference:
|
|
6484
|
+
reference: Z,
|
|
6485
6485
|
expects: "Object",
|
|
6486
6486
|
async: !1,
|
|
6487
6487
|
entries: e,
|
|
6488
6488
|
message: t,
|
|
6489
6489
|
get "~standard"() {
|
|
6490
|
-
return /* @__PURE__ */
|
|
6490
|
+
return /* @__PURE__ */ Y(this);
|
|
6491
6491
|
},
|
|
6492
6492
|
"~run"(e, t) {
|
|
6493
6493
|
let n = e.value;
|
|
@@ -6496,7 +6496,7 @@ function Q(e, t) {
|
|
|
6496
6496
|
for (let r in this.entries) {
|
|
6497
6497
|
let i = this.entries[r];
|
|
6498
6498
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6499
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
6499
|
+
let a = r in n ? n[r] : /* @__PURE__ */ oi(i), o = i["~run"]({ value: a }, t);
|
|
6500
6500
|
if (o.issues) {
|
|
6501
6501
|
let i = {
|
|
6502
6502
|
type: "object",
|
|
@@ -6512,8 +6512,8 @@ function Q(e, t) {
|
|
|
6512
6512
|
}
|
|
6513
6513
|
}
|
|
6514
6514
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6515
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6516
|
-
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (
|
|
6515
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ai(i);
|
|
6516
|
+
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (ti(this, "key", e, t, {
|
|
6517
6517
|
input: void 0,
|
|
6518
6518
|
expected: `"${r}"`,
|
|
6519
6519
|
path: [{
|
|
@@ -6525,48 +6525,48 @@ function Q(e, t) {
|
|
|
6525
6525
|
}]
|
|
6526
6526
|
}), t.abortEarly)) break;
|
|
6527
6527
|
}
|
|
6528
|
-
} else
|
|
6528
|
+
} else ti(this, "type", e, t);
|
|
6529
6529
|
return e;
|
|
6530
6530
|
}
|
|
6531
6531
|
};
|
|
6532
6532
|
}
|
|
6533
6533
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6534
|
-
function
|
|
6534
|
+
function di(e, t) {
|
|
6535
6535
|
return {
|
|
6536
6536
|
kind: "schema",
|
|
6537
6537
|
type: "optional",
|
|
6538
|
-
reference:
|
|
6538
|
+
reference: di,
|
|
6539
6539
|
expects: `(${e.expects} | undefined)`,
|
|
6540
6540
|
async: !1,
|
|
6541
6541
|
wrapped: e,
|
|
6542
6542
|
default: t,
|
|
6543
6543
|
get "~standard"() {
|
|
6544
|
-
return /* @__PURE__ */
|
|
6544
|
+
return /* @__PURE__ */ Y(this);
|
|
6545
6545
|
},
|
|
6546
6546
|
"~run"(e, t) {
|
|
6547
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6547
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ oi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6548
6548
|
}
|
|
6549
6549
|
};
|
|
6550
6550
|
}
|
|
6551
6551
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6552
|
-
function
|
|
6552
|
+
function fi(e, t, n) {
|
|
6553
6553
|
return {
|
|
6554
6554
|
kind: "schema",
|
|
6555
6555
|
type: "record",
|
|
6556
|
-
reference:
|
|
6556
|
+
reference: fi,
|
|
6557
6557
|
expects: "Object",
|
|
6558
6558
|
async: !1,
|
|
6559
6559
|
key: e,
|
|
6560
6560
|
value: t,
|
|
6561
6561
|
message: n,
|
|
6562
6562
|
get "~standard"() {
|
|
6563
|
-
return /* @__PURE__ */
|
|
6563
|
+
return /* @__PURE__ */ Y(this);
|
|
6564
6564
|
},
|
|
6565
6565
|
"~run"(e, t) {
|
|
6566
6566
|
let n = e.value;
|
|
6567
6567
|
if (n && typeof n == "object") {
|
|
6568
6568
|
e.typed = !0, e.value = {};
|
|
6569
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6569
|
+
for (let r in n) if (/* @__PURE__ */ ri(n, r)) {
|
|
6570
6570
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6571
6571
|
if (a.issues) {
|
|
6572
6572
|
let o = {
|
|
@@ -6599,47 +6599,47 @@ function di(e, t, n) {
|
|
|
6599
6599
|
}
|
|
6600
6600
|
(!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
|
|
6601
6601
|
}
|
|
6602
|
-
} else
|
|
6602
|
+
} else ti(this, "type", e, t);
|
|
6603
6603
|
return e;
|
|
6604
6604
|
}
|
|
6605
6605
|
};
|
|
6606
6606
|
}
|
|
6607
6607
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6608
|
-
function
|
|
6608
|
+
function Q(e) {
|
|
6609
6609
|
return {
|
|
6610
6610
|
kind: "schema",
|
|
6611
6611
|
type: "string",
|
|
6612
|
-
reference:
|
|
6612
|
+
reference: Q,
|
|
6613
6613
|
expects: "string",
|
|
6614
6614
|
async: !1,
|
|
6615
6615
|
message: e,
|
|
6616
6616
|
get "~standard"() {
|
|
6617
|
-
return /* @__PURE__ */
|
|
6617
|
+
return /* @__PURE__ */ Y(this);
|
|
6618
6618
|
},
|
|
6619
6619
|
"~run"(e, t) {
|
|
6620
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
6620
|
+
return typeof e.value == "string" ? e.typed = !0 : ti(this, "type", e, t), e;
|
|
6621
6621
|
}
|
|
6622
6622
|
};
|
|
6623
6623
|
}
|
|
6624
6624
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6625
|
-
function
|
|
6625
|
+
function pi(e) {
|
|
6626
6626
|
let t;
|
|
6627
6627
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6628
6628
|
else t = n.issues;
|
|
6629
6629
|
return t;
|
|
6630
6630
|
}
|
|
6631
6631
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6632
|
-
function
|
|
6632
|
+
function mi(e, t) {
|
|
6633
6633
|
return {
|
|
6634
6634
|
kind: "schema",
|
|
6635
6635
|
type: "union",
|
|
6636
|
-
reference:
|
|
6637
|
-
expects: /* @__PURE__ */
|
|
6636
|
+
reference: mi,
|
|
6637
|
+
expects: /* @__PURE__ */ ii(e.map((e) => e.expects), "|"),
|
|
6638
6638
|
async: !1,
|
|
6639
6639
|
options: e,
|
|
6640
6640
|
message: t,
|
|
6641
6641
|
get "~standard"() {
|
|
6642
|
-
return /* @__PURE__ */
|
|
6642
|
+
return /* @__PURE__ */ Y(this);
|
|
6643
6643
|
},
|
|
6644
6644
|
"~run"(e, t) {
|
|
6645
6645
|
let n, r, i;
|
|
@@ -6655,24 +6655,24 @@ function pi(e, t) {
|
|
|
6655
6655
|
if (n) return n;
|
|
6656
6656
|
if (r) {
|
|
6657
6657
|
if (r.length === 1) return r[0];
|
|
6658
|
-
|
|
6658
|
+
ti(this, "type", e, t, { issues: /* @__PURE__ */ pi(r) }), e.typed = !0;
|
|
6659
6659
|
} else if (i?.length === 1) return i[0];
|
|
6660
|
-
else
|
|
6660
|
+
else ti(this, "type", e, t, { issues: /* @__PURE__ */ pi(i) });
|
|
6661
6661
|
return e;
|
|
6662
6662
|
}
|
|
6663
6663
|
};
|
|
6664
6664
|
}
|
|
6665
|
-
var
|
|
6666
|
-
en: /* @__PURE__ */
|
|
6667
|
-
es: /* @__PURE__ */
|
|
6668
|
-
}), gi = /* @__PURE__ */
|
|
6669
|
-
en: /* @__PURE__ */
|
|
6670
|
-
es: /* @__PURE__ */
|
|
6671
|
-
}), _i = /* @__PURE__ */
|
|
6672
|
-
en: /* @__PURE__ */
|
|
6673
|
-
es: /* @__PURE__ */
|
|
6665
|
+
var $ = (e) => /* @__PURE__ */ mi(e.map((e) => /* @__PURE__ */ li(e))), hi = /* @__PURE__ */ Z({
|
|
6666
|
+
en: /* @__PURE__ */ Q(),
|
|
6667
|
+
es: /* @__PURE__ */ Q()
|
|
6668
|
+
}), gi = /* @__PURE__ */ Z({
|
|
6669
|
+
en: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ Q())),
|
|
6670
|
+
es: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ Q()))
|
|
6671
|
+
}), _i = /* @__PURE__ */ Z({
|
|
6672
|
+
en: /* @__PURE__ */ di(/* @__PURE__ */ Q()),
|
|
6673
|
+
es: /* @__PURE__ */ di(/* @__PURE__ */ Q())
|
|
6674
6674
|
});
|
|
6675
|
-
|
|
6675
|
+
$([
|
|
6676
6676
|
"app",
|
|
6677
6677
|
"connection",
|
|
6678
6678
|
"connector",
|
|
@@ -6697,12 +6697,12 @@ mi([
|
|
|
6697
6697
|
"presenterPresentation",
|
|
6698
6698
|
"tool"
|
|
6699
6699
|
]);
|
|
6700
|
-
var vi =
|
|
6700
|
+
var vi = $([
|
|
6701
6701
|
"amber",
|
|
6702
6702
|
"green",
|
|
6703
6703
|
"red",
|
|
6704
6704
|
"other"
|
|
6705
|
-
]), yi =
|
|
6705
|
+
]), yi = $([
|
|
6706
6706
|
"alpha",
|
|
6707
6707
|
"beta",
|
|
6708
6708
|
"generalAvailability",
|
|
@@ -6712,29 +6712,29 @@ var vi = mi([
|
|
|
6712
6712
|
"releaseCandidate",
|
|
6713
6713
|
"unavailable",
|
|
6714
6714
|
"underReview"
|
|
6715
|
-
]), bi = /* @__PURE__ */
|
|
6715
|
+
]), bi = /* @__PURE__ */ Z({
|
|
6716
6716
|
color: vi,
|
|
6717
|
-
label: /* @__PURE__ */
|
|
6718
|
-
}), xi = /* @__PURE__ */
|
|
6719
|
-
id: /* @__PURE__ */
|
|
6717
|
+
label: /* @__PURE__ */ Q()
|
|
6718
|
+
}), xi = /* @__PURE__ */ Z({
|
|
6719
|
+
id: /* @__PURE__ */ Q(),
|
|
6720
6720
|
label: _i,
|
|
6721
6721
|
description: gi,
|
|
6722
|
-
icon: /* @__PURE__ */
|
|
6723
|
-
iconDark: /* @__PURE__ */
|
|
6724
|
-
order: /* @__PURE__ */
|
|
6725
|
-
path: /* @__PURE__ */
|
|
6722
|
+
icon: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6723
|
+
iconDark: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6724
|
+
order: /* @__PURE__ */ ui(),
|
|
6725
|
+
path: /* @__PURE__ */ Q()
|
|
6726
6726
|
}), Si = {
|
|
6727
|
-
id: /* @__PURE__ */
|
|
6727
|
+
id: /* @__PURE__ */ Q(),
|
|
6728
6728
|
label: _i,
|
|
6729
6729
|
description: gi,
|
|
6730
|
-
firstCreatedAt: /* @__PURE__ */
|
|
6731
|
-
icon: /* @__PURE__ */
|
|
6732
|
-
iconDark: /* @__PURE__ */
|
|
6733
|
-
lastUpdatedAt: /* @__PURE__ */
|
|
6734
|
-
status: /* @__PURE__ */
|
|
6735
|
-
statusId: /* @__PURE__ */
|
|
6730
|
+
firstCreatedAt: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
|
|
6731
|
+
icon: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6732
|
+
iconDark: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6733
|
+
lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
|
|
6734
|
+
status: /* @__PURE__ */ X(bi),
|
|
6735
|
+
statusId: /* @__PURE__ */ X(yi)
|
|
6736
6736
|
};
|
|
6737
|
-
({ ...Si }),
|
|
6737
|
+
({ ...Si }), $([
|
|
6738
6738
|
"app",
|
|
6739
6739
|
"engine",
|
|
6740
6740
|
"connector",
|
|
@@ -6747,18 +6747,19 @@ var vi = mi([
|
|
|
6747
6747
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-COF8ocp_.js
|
|
6748
6748
|
var Ci = {
|
|
6749
6749
|
...Si,
|
|
6750
|
-
version: /* @__PURE__ */
|
|
6750
|
+
version: /* @__PURE__ */ Q()
|
|
6751
6751
|
};
|
|
6752
6752
|
({ ...Ci });
|
|
6753
6753
|
//#endregion
|
|
6754
6754
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6755
|
-
var wi =
|
|
6755
|
+
var wi = $([
|
|
6756
6756
|
"abortOperation",
|
|
6757
6757
|
"auditObjectContent",
|
|
6758
6758
|
"createObject",
|
|
6759
6759
|
"describeConnection",
|
|
6760
6760
|
"dropObject",
|
|
6761
6761
|
"findObject",
|
|
6762
|
+
"getInfo",
|
|
6762
6763
|
"getReadableStream",
|
|
6763
6764
|
"getRecord",
|
|
6764
6765
|
"listNodes",
|
|
@@ -6767,41 +6768,49 @@ var wi = mi([
|
|
|
6767
6768
|
"retrieveChunks",
|
|
6768
6769
|
"retrieveRecords",
|
|
6769
6770
|
"upsertRecords"
|
|
6770
|
-
]), Ti =
|
|
6771
|
+
]), Ti = $([
|
|
6771
6772
|
"application",
|
|
6772
6773
|
"curatedDataset",
|
|
6773
6774
|
"database",
|
|
6774
6775
|
"fileStore"
|
|
6775
|
-
]), Ei = /* @__PURE__ */
|
|
6776
|
-
|
|
6776
|
+
]), Ei = /* @__PURE__ */ Z({ label: hi }), Di = $([
|
|
6777
|
+
"bidirectional",
|
|
6778
|
+
"destination",
|
|
6779
|
+
"source",
|
|
6780
|
+
"unknown"
|
|
6781
|
+
]), Oi = /* @__PURE__ */ Z({ label: hi }), ki = /* @__PURE__ */ Z({
|
|
6782
|
+
authMethodId: $([
|
|
6777
6783
|
"apiKey",
|
|
6778
6784
|
"disabled",
|
|
6779
6785
|
"oAuth2",
|
|
6780
6786
|
"none"
|
|
6781
6787
|
]),
|
|
6782
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6783
|
-
canDescribe: /* @__PURE__ */
|
|
6784
|
-
id: /* @__PURE__ */
|
|
6785
|
-
label: /* @__PURE__ */
|
|
6786
|
-
maxConnectionCount: /* @__PURE__ */
|
|
6787
|
-
params: /* @__PURE__ */
|
|
6788
|
-
}),
|
|
6789
|
-
typeId: /* @__PURE__ */
|
|
6788
|
+
activeConnectionCount: /* @__PURE__ */ di(/* @__PURE__ */ ui()),
|
|
6789
|
+
canDescribe: /* @__PURE__ */ di(/* @__PURE__ */ ci()),
|
|
6790
|
+
id: /* @__PURE__ */ di(/* @__PURE__ */ Q()),
|
|
6791
|
+
label: /* @__PURE__ */ di(hi),
|
|
6792
|
+
maxConnectionCount: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
|
|
6793
|
+
params: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ fi(/* @__PURE__ */ Q(), /* @__PURE__ */ Q())))
|
|
6794
|
+
}), Ai = /* @__PURE__ */ Z({
|
|
6795
|
+
typeId: /* @__PURE__ */ li("connector"),
|
|
6790
6796
|
...Ci,
|
|
6791
|
-
actionNames: /* @__PURE__ */
|
|
6792
|
-
category: /* @__PURE__ */
|
|
6797
|
+
actionNames: /* @__PURE__ */ si(wi),
|
|
6798
|
+
category: /* @__PURE__ */ X(Ei),
|
|
6793
6799
|
categoryId: Ti,
|
|
6794
|
-
implementations: /* @__PURE__ */
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6800
|
+
implementations: /* @__PURE__ */ fi(/* @__PURE__ */ Q(), ki),
|
|
6801
|
+
usage: /* @__PURE__ */ X(Oi),
|
|
6802
|
+
usageId: Di,
|
|
6803
|
+
vendorAccountURL: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6804
|
+
vendorDocumentationURL: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
|
|
6805
|
+
vendorHomeURL: /* @__PURE__ */ X(/* @__PURE__ */ Q())
|
|
6806
|
+
}), ji = {
|
|
6799
6807
|
abortOperation: "Abort Operation",
|
|
6800
6808
|
auditObjectContent: "Audit Object Content",
|
|
6801
6809
|
createObject: "Create Object",
|
|
6802
6810
|
describeConnection: "Describe Connection",
|
|
6803
6811
|
dropObject: "Drop Object",
|
|
6804
6812
|
findObject: "Find Object",
|
|
6813
|
+
getInfo: "Get Info",
|
|
6805
6814
|
getReadableStream: "Get Readable Stream",
|
|
6806
6815
|
getRecord: "Get Record",
|
|
6807
6816
|
listNodes: "List Nodes",
|
|
@@ -6810,14 +6819,15 @@ var wi = mi([
|
|
|
6810
6819
|
retrieveChunks: "Retrieve Chunks",
|
|
6811
6820
|
retrieveRecords: "Retrieve Records",
|
|
6812
6821
|
upsertRecords: "Upsert Records"
|
|
6813
|
-
},
|
|
6822
|
+
}, Mi = /* @__PURE__ */ new Set([
|
|
6814
6823
|
"createObject",
|
|
6815
6824
|
"dropObject",
|
|
6816
6825
|
"removeRecords",
|
|
6817
6826
|
"upsertRecords"
|
|
6818
|
-
]),
|
|
6827
|
+
]), Ni = /* @__PURE__ */ new Set([
|
|
6819
6828
|
"auditObjectContent",
|
|
6820
6829
|
"findObject",
|
|
6830
|
+
"getInfo",
|
|
6821
6831
|
"getReadableStream",
|
|
6822
6832
|
"getRecord",
|
|
6823
6833
|
"listNodes",
|
|
@@ -6825,47 +6835,47 @@ var wi = mi([
|
|
|
6825
6835
|
"retrieveChunks",
|
|
6826
6836
|
"retrieveRecords"
|
|
6827
6837
|
]);
|
|
6828
|
-
function
|
|
6838
|
+
function Pi(e) {
|
|
6829
6839
|
let t = !1, n = !1;
|
|
6830
|
-
for (let r of e)
|
|
6840
|
+
for (let r of e) Ni.has(r) && (t = !0), Mi.has(r) && (n = !0);
|
|
6831
6841
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6832
6842
|
}
|
|
6833
|
-
function
|
|
6843
|
+
function Fi(e) {
|
|
6834
6844
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
6835
6845
|
n += "|:----|:-------:|\n";
|
|
6836
|
-
for (let e of Object.keys(
|
|
6846
|
+
for (let e of Object.keys(ji)) n += `| ${ji[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6837
6847
|
return n;
|
|
6838
6848
|
}
|
|
6839
6849
|
//#endregion
|
|
6840
6850
|
//#region src/actions/documentActions.ts
|
|
6841
|
-
var
|
|
6851
|
+
var Ii = "<!-- CONNECTOR_ACTIONS_START -->", Li = "<!-- CONNECTOR_ACTIONS_END -->", Ri = "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.", zi = {
|
|
6842
6852
|
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.",
|
|
6843
6853
|
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.",
|
|
6844
6854
|
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.",
|
|
6845
6855
|
unknown: "This connector does not yet implement any read or write actions, so its type cannot be determined. Connectors function as a Source (read-only), a Destination (write-only), or Bidirectional (read/write), depending on the actions they support."
|
|
6846
|
-
},
|
|
6847
|
-
async function
|
|
6856
|
+
}, Bi = "The table below lists all connector actions and highlights those supported by this connector.";
|
|
6857
|
+
async function Vi() {
|
|
6848
6858
|
try {
|
|
6849
|
-
|
|
6850
|
-
let e = (await
|
|
6851
|
-
await
|
|
6859
|
+
G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
|
|
6860
|
+
let e = (await U("config.json")).actionNames ?? [], t = Pi(e), n = Fi(e), r = `${Ri}\n\n${zi[t]} ${Bi}\n\n${n}`;
|
|
6861
|
+
await Bn("README.md", Gn(await W("./README.md"), r, Ii, Li)), K("Actions documented");
|
|
6852
6862
|
} catch (e) {
|
|
6853
6863
|
console.error("❌ Error documenting actions", e), process.exit(1);
|
|
6854
6864
|
}
|
|
6855
6865
|
}
|
|
6856
6866
|
//#endregion
|
|
6857
6867
|
//#region src/actions/documentOpening.ts
|
|
6858
|
-
var
|
|
6859
|
-
async function
|
|
6868
|
+
var Hi = "<!-- OPENING_START -->", Ui = "<!-- OPENING_END -->";
|
|
6869
|
+
async function Wi() {
|
|
6860
6870
|
try {
|
|
6861
|
-
|
|
6862
|
-
let e = await
|
|
6863
|
-
await
|
|
6871
|
+
G("Document Opening"), q("1️⃣ Insert opening content into 'README.md'");
|
|
6872
|
+
let e = await U("package.json"), t = await U("config.json"), { owner: n, repo: r } = Gi(e), i = Ji(n, r, Ki(e), qi(t));
|
|
6873
|
+
await Bn("README.md", Gn(await W("./README.md"), i, Hi, Ui)), K("Opening documented");
|
|
6864
6874
|
} catch (e) {
|
|
6865
6875
|
console.error("❌ Error documenting opening", e), process.exit(1);
|
|
6866
6876
|
}
|
|
6867
6877
|
}
|
|
6868
|
-
function
|
|
6878
|
+
function Gi(e) {
|
|
6869
6879
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6870
6880
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document opening.");
|
|
6871
6881
|
let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
|
|
@@ -6875,17 +6885,17 @@ function Ui(e) {
|
|
|
6875
6885
|
repo: i[2]
|
|
6876
6886
|
};
|
|
6877
6887
|
}
|
|
6878
|
-
function
|
|
6888
|
+
function Ki(e) {
|
|
6879
6889
|
let t = e.license;
|
|
6880
6890
|
if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
|
|
6881
6891
|
return t;
|
|
6882
6892
|
}
|
|
6883
|
-
function
|
|
6893
|
+
function qi(e) {
|
|
6884
6894
|
let t = e.description.en;
|
|
6885
6895
|
if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
|
|
6886
6896
|
return t.join("\n\n");
|
|
6887
6897
|
}
|
|
6888
|
-
function
|
|
6898
|
+
function Ji(e, t, n, r) {
|
|
6889
6899
|
let i = `https://github.com/${e}/${t}`;
|
|
6890
6900
|
return `[}-blue.svg)](./LICENSE)
|
|
6891
6901
|
[](${i}/releases/latest)
|
|
@@ -6905,31 +6915,31 @@ ${r}`;
|
|
|
6905
6915
|
}
|
|
6906
6916
|
//#endregion
|
|
6907
6917
|
//#region src/actions/documentUsage.ts
|
|
6908
|
-
var
|
|
6909
|
-
async function
|
|
6918
|
+
var Yi = "<!-- USAGE_START -->", Xi = "<!-- USAGE_END -->";
|
|
6919
|
+
async function Zi() {
|
|
6910
6920
|
try {
|
|
6911
|
-
|
|
6912
|
-
let e = await
|
|
6913
|
-
await
|
|
6921
|
+
G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
|
|
6922
|
+
let e = await U("package.json"), t = Qi(e), n = ta(t, $i(t), ea(e.engines?.node), ea(e.engines?.npm), ea(e.devDependencies?.typescript));
|
|
6923
|
+
await Bn("README.md", Gn(await W("./README.md"), n, Yi, Xi)), K("Usage documented");
|
|
6914
6924
|
} catch (e) {
|
|
6915
6925
|
console.error("❌ Error documenting usage", e), process.exit(1);
|
|
6916
6926
|
}
|
|
6917
6927
|
}
|
|
6918
|
-
function
|
|
6928
|
+
function Qi(e) {
|
|
6919
6929
|
let t = e.repository, n = typeof t == "string" ? t : t?.url;
|
|
6920
6930
|
if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
|
|
6921
6931
|
return n.replace(/^git\+/, "");
|
|
6922
6932
|
}
|
|
6923
|
-
function
|
|
6933
|
+
function $i(e) {
|
|
6924
6934
|
return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
|
|
6925
6935
|
}
|
|
6926
|
-
function
|
|
6936
|
+
function ea(e) {
|
|
6927
6937
|
if (e == null) throw Error("package.json version range is required to document usage.");
|
|
6928
6938
|
let t = /\d+(?:\.\d+)*/.exec(e);
|
|
6929
6939
|
if (t == null) throw Error(`Unable to parse version from '${e}'.`);
|
|
6930
6940
|
return t[0];
|
|
6931
6941
|
}
|
|
6932
|
-
function
|
|
6942
|
+
function ta(e, t, n, r, i) {
|
|
6933
6943
|
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.
|
|
6934
6944
|
|
|
6935
6945
|
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.
|
|
@@ -6944,43 +6954,43 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
|
|
|
6944
6954
|
}
|
|
6945
6955
|
//#endregion
|
|
6946
6956
|
//#region src/actions/formatCode.ts
|
|
6947
|
-
async function
|
|
6957
|
+
async function na() {
|
|
6948
6958
|
try {
|
|
6949
|
-
|
|
6959
|
+
G("Format Code"), await In("1️⃣ Format", "prettier", [
|
|
6950
6960
|
"--write",
|
|
6951
6961
|
"*.json",
|
|
6952
6962
|
"*.md",
|
|
6953
6963
|
"*.ts",
|
|
6954
6964
|
...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
|
|
6955
|
-
]),
|
|
6965
|
+
]), K("Code formatted");
|
|
6956
6966
|
} catch (e) {
|
|
6957
6967
|
console.error("❌ Error formatting code", e), process.exit(1);
|
|
6958
6968
|
}
|
|
6959
6969
|
}
|
|
6960
6970
|
//#endregion
|
|
6961
6971
|
//#region src/actions/lintCode.ts
|
|
6962
|
-
async function
|
|
6972
|
+
async function ra() {
|
|
6963
6973
|
try {
|
|
6964
|
-
|
|
6974
|
+
G("Lint Code"), await In("1️⃣ Lint", "eslint", ["."]), K("Code linted");
|
|
6965
6975
|
} catch (e) {
|
|
6966
6976
|
console.error("❌ Error linting code", e), process.exit(1);
|
|
6967
6977
|
}
|
|
6968
6978
|
}
|
|
6969
6979
|
//#endregion
|
|
6970
6980
|
//#region src/utilities/cloudflare.ts
|
|
6971
|
-
async function
|
|
6972
|
-
let e = await
|
|
6981
|
+
async function ia() {
|
|
6982
|
+
let e = await U("config.json"), t = {
|
|
6973
6983
|
body: JSON.stringify(e),
|
|
6974
6984
|
headers: { "Content-Type": "application/json" },
|
|
6975
6985
|
method: "PUT"
|
|
6976
6986
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6977
6987
|
if (!n.ok) throw Error(await n.text());
|
|
6978
6988
|
}
|
|
6979
|
-
async function
|
|
6989
|
+
async function aa(e, t) {
|
|
6980
6990
|
async function n(e, t, r) {
|
|
6981
6991
|
for (let i of r) {
|
|
6982
6992
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
6983
|
-
(await
|
|
6993
|
+
(await Hn(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
|
|
6984
6994
|
"r2",
|
|
6985
6995
|
"object",
|
|
6986
6996
|
"put",
|
|
@@ -6991,10 +7001,10 @@ async function ra(e, t) {
|
|
|
6991
7001
|
]));
|
|
6992
7002
|
}
|
|
6993
7003
|
}
|
|
6994
|
-
let r = await
|
|
7004
|
+
let r = await Pn(`${e}/${t}/`);
|
|
6995
7005
|
await n(`${e}/${t}`, t, r);
|
|
6996
7006
|
}
|
|
6997
|
-
async function
|
|
7007
|
+
async function oa(e) {
|
|
6998
7008
|
let t = e.id, n = {
|
|
6999
7009
|
body: JSON.stringify(e),
|
|
7000
7010
|
headers: { "Content-Type": "application/json" },
|
|
@@ -7002,14 +7012,14 @@ async function ia(e) {
|
|
|
7002
7012
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
7003
7013
|
if (!r.ok) throw Error(await r.text());
|
|
7004
7014
|
}
|
|
7005
|
-
async function
|
|
7015
|
+
async function sa(e, t) {
|
|
7006
7016
|
let n = `v${e.version ?? "unknown"}`;
|
|
7007
7017
|
async function r(e, r = "") {
|
|
7008
|
-
let i = await
|
|
7018
|
+
let i = await Pn(e, { withFileTypes: !0 });
|
|
7009
7019
|
for (let a of i) {
|
|
7010
7020
|
if (a.isDirectory()) continue;
|
|
7011
7021
|
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;
|
|
7012
|
-
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await
|
|
7022
|
+
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await Fn(void 0, "wrangler", [
|
|
7013
7023
|
"r2",
|
|
7014
7024
|
"object",
|
|
7015
7025
|
"put",
|
|
@@ -7026,24 +7036,24 @@ async function aa(e, t) {
|
|
|
7026
7036
|
}
|
|
7027
7037
|
//#endregion
|
|
7028
7038
|
//#region node_modules/valibot/dist/index.mjs
|
|
7029
|
-
var
|
|
7039
|
+
var ca, la = {
|
|
7030
7040
|
lang: void 0,
|
|
7031
7041
|
message: void 0,
|
|
7032
7042
|
abortEarly: void 0,
|
|
7033
7043
|
abortPipeEarly: void 0
|
|
7034
7044
|
};
|
|
7035
7045
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7036
|
-
function
|
|
7037
|
-
return !e && !
|
|
7038
|
-
lang: e?.lang ??
|
|
7046
|
+
function ua(e) {
|
|
7047
|
+
return !e && !ca ? la : {
|
|
7048
|
+
lang: e?.lang ?? ca?.lang,
|
|
7039
7049
|
message: e?.message,
|
|
7040
|
-
abortEarly: e?.abortEarly ??
|
|
7041
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
7050
|
+
abortEarly: e?.abortEarly ?? ca?.abortEarly,
|
|
7051
|
+
abortPipeEarly: e?.abortPipeEarly ?? ca?.abortPipeEarly
|
|
7042
7052
|
};
|
|
7043
7053
|
}
|
|
7044
7054
|
/* @__NO_SIDE_EFFECTS__ */
|
|
7045
|
-
function
|
|
7046
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
7055
|
+
function da(e, t, n) {
|
|
7056
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ ua(n));
|
|
7047
7057
|
return {
|
|
7048
7058
|
typed: r.typed,
|
|
7049
7059
|
success: !r.issues,
|
|
@@ -7053,175 +7063,175 @@ function la(e, t, n) {
|
|
|
7053
7063
|
}
|
|
7054
7064
|
//#endregion
|
|
7055
7065
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
|
|
7056
|
-
var
|
|
7057
|
-
typeId: /* @__PURE__ */
|
|
7066
|
+
var fa = /* @__PURE__ */ Z({
|
|
7067
|
+
typeId: /* @__PURE__ */ li("contextArea"),
|
|
7058
7068
|
...Si,
|
|
7059
|
-
modelRefs: /* @__PURE__ */
|
|
7060
|
-
order: /* @__PURE__ */
|
|
7061
|
-
}),
|
|
7062
|
-
typeId: /* @__PURE__ */
|
|
7069
|
+
modelRefs: /* @__PURE__ */ si(xi),
|
|
7070
|
+
order: /* @__PURE__ */ ui()
|
|
7071
|
+
}), pa = $(["listContextFocuses"]), ma = /* @__PURE__ */ Z({
|
|
7072
|
+
typeId: /* @__PURE__ */ li("context"),
|
|
7063
7073
|
...Ci,
|
|
7064
|
-
actionNames: /* @__PURE__ */
|
|
7065
|
-
models: /* @__PURE__ */
|
|
7066
|
-
}),
|
|
7074
|
+
actionNames: /* @__PURE__ */ si(pa),
|
|
7075
|
+
models: /* @__PURE__ */ si(fa)
|
|
7076
|
+
}), ha = $([
|
|
7067
7077
|
"list",
|
|
7068
7078
|
"render",
|
|
7069
7079
|
"setColorMode"
|
|
7070
|
-
]),
|
|
7071
|
-
typeId: /* @__PURE__ */
|
|
7080
|
+
]), ga = /* @__PURE__ */ Z({
|
|
7081
|
+
typeId: /* @__PURE__ */ li("presenter"),
|
|
7072
7082
|
...Ci,
|
|
7073
|
-
actionNames: /* @__PURE__ */
|
|
7074
|
-
presentations: /* @__PURE__ */
|
|
7083
|
+
actionNames: /* @__PURE__ */ si(ha),
|
|
7084
|
+
presentations: /* @__PURE__ */ si(xi)
|
|
7075
7085
|
});
|
|
7076
7086
|
//#endregion
|
|
7077
7087
|
//#region src/actions/manageProject.ts
|
|
7078
|
-
async function
|
|
7088
|
+
async function _a() {
|
|
7079
7089
|
try {
|
|
7080
|
-
|
|
7090
|
+
G("Build Project"), await In("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
|
|
7081
7091
|
} catch (e) {
|
|
7082
7092
|
console.error("❌ Error building project", e), process.exit(1);
|
|
7083
7093
|
}
|
|
7084
7094
|
}
|
|
7085
|
-
async function
|
|
7095
|
+
async function va() {
|
|
7086
7096
|
try {
|
|
7087
|
-
|
|
7088
|
-
let e = await
|
|
7089
|
-
if (n.typeId === "app")
|
|
7090
|
-
else if (n.typeId === "engine")
|
|
7091
|
-
else if (n.uploadGroupName === void 0)
|
|
7097
|
+
G("Publish Project");
|
|
7098
|
+
let e = await U("package.json"), t = await U("config.json"), n = Vn(t.id);
|
|
7099
|
+
if (n.typeId === "app") q("1️⃣ Register module"), await ia();
|
|
7100
|
+
else if (n.typeId === "engine") q("1️⃣ Register module"), await sa(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await oa(t);
|
|
7101
|
+
else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
|
|
7092
7102
|
else {
|
|
7093
|
-
|
|
7103
|
+
q("1️⃣ Register module");
|
|
7094
7104
|
let r = t.id.split("-").slice(2).join("-");
|
|
7095
|
-
await
|
|
7105
|
+
await sa(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await oa(t);
|
|
7096
7106
|
}
|
|
7097
|
-
|
|
7107
|
+
K(`Project version '${e.version ?? "unknown"}' published.`);
|
|
7098
7108
|
} catch (e) {
|
|
7099
7109
|
console.error("❌ Error publishing project", e), process.exit(1);
|
|
7100
7110
|
}
|
|
7101
7111
|
}
|
|
7102
|
-
async function
|
|
7112
|
+
async function ya() {
|
|
7103
7113
|
try {
|
|
7104
|
-
|
|
7105
|
-
let e = await
|
|
7106
|
-
await
|
|
7107
|
-
let n =
|
|
7114
|
+
G("Release Project");
|
|
7115
|
+
let e = await U("package.json"), t = await U("config.json");
|
|
7116
|
+
await Da("1️⃣ ", e);
|
|
7117
|
+
let n = Vn(t.id);
|
|
7108
7118
|
switch (n.typeId) {
|
|
7109
7119
|
case "connector":
|
|
7110
|
-
t = await
|
|
7120
|
+
t = await xa("2️⃣ ", e);
|
|
7111
7121
|
break;
|
|
7112
7122
|
case "context":
|
|
7113
|
-
t = await
|
|
7123
|
+
t = await Sa("2️⃣ ", e);
|
|
7114
7124
|
break;
|
|
7115
7125
|
case "presenter":
|
|
7116
|
-
t = await
|
|
7126
|
+
t = await Ca("2️⃣ ", e);
|
|
7117
7127
|
break;
|
|
7118
|
-
default: t = await
|
|
7128
|
+
default: t = await ba("2️⃣ ", e);
|
|
7119
7129
|
}
|
|
7120
|
-
if (await
|
|
7130
|
+
if (await In("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
|
|
7121
7131
|
"commit",
|
|
7122
7132
|
"-m",
|
|
7123
7133
|
`v${e.version ?? "unknown"}`
|
|
7124
|
-
]), await
|
|
7134
|
+
]), await Fn("6️⃣ Push changes", "git", [
|
|
7125
7135
|
"push",
|
|
7126
7136
|
"origin",
|
|
7127
7137
|
"main:main"
|
|
7128
|
-
]), n.typeId === "app")
|
|
7129
|
-
else if (n.typeId === "engine")
|
|
7130
|
-
else if (n.uploadGroupName === void 0)
|
|
7138
|
+
]), n.typeId === "app") q("7️⃣ Register module"), await ia();
|
|
7139
|
+
else if (n.typeId === "engine") q("7️⃣ Register module"), await sa(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await oa(t);
|
|
7140
|
+
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
|
|
7131
7141
|
else {
|
|
7132
|
-
|
|
7142
|
+
q("7️⃣ Register module");
|
|
7133
7143
|
let r = t.id.split("-").slice(2).join("-");
|
|
7134
|
-
await
|
|
7144
|
+
await sa(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await oa(t);
|
|
7135
7145
|
}
|
|
7136
7146
|
if (n.publishedTo === "npm") {
|
|
7137
7147
|
let e = ".npmrc";
|
|
7138
7148
|
try {
|
|
7139
|
-
await
|
|
7149
|
+
await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await In("8️⃣ Publish to npm", "npm", [
|
|
7140
7150
|
"publish",
|
|
7141
7151
|
"--access",
|
|
7142
7152
|
"public"
|
|
7143
7153
|
]);
|
|
7144
7154
|
} finally {
|
|
7145
|
-
await
|
|
7155
|
+
await Rn(e);
|
|
7146
7156
|
}
|
|
7147
|
-
} else
|
|
7148
|
-
|
|
7157
|
+
} else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
7158
|
+
K(`Project version '${e.version ?? "unknown"}' released.`);
|
|
7149
7159
|
} catch (e) {
|
|
7150
7160
|
console.error("❌ Error releasing project", e), process.exit(1);
|
|
7151
7161
|
}
|
|
7152
7162
|
}
|
|
7153
|
-
async function
|
|
7154
|
-
|
|
7155
|
-
let n = await
|
|
7156
|
-
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await
|
|
7163
|
+
async function ba(e, t) {
|
|
7164
|
+
q(`${e} Build project configuration`);
|
|
7165
|
+
let n = await U("config.json");
|
|
7166
|
+
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await zn("config.json", n), n;
|
|
7157
7167
|
}
|
|
7158
|
-
async function
|
|
7159
|
-
|
|
7160
|
-
let [n, r] = await Promise.all([
|
|
7168
|
+
async function xa(e, t) {
|
|
7169
|
+
q(`${e} Build connector project configuration`);
|
|
7170
|
+
let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(Ai, n);
|
|
7161
7171
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7162
|
-
let a =
|
|
7163
|
-
return await
|
|
7172
|
+
let a = Un(r);
|
|
7173
|
+
return await wa(t, n, a, Pi(a));
|
|
7164
7174
|
}
|
|
7165
|
-
async function
|
|
7166
|
-
|
|
7167
|
-
let [n, r] = await Promise.all([
|
|
7175
|
+
async function Sa(e, t) {
|
|
7176
|
+
q(`${e} Build context project configuration`);
|
|
7177
|
+
let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(ma, n);
|
|
7168
7178
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7169
|
-
return await
|
|
7179
|
+
return await wa(t, n, Un(r));
|
|
7170
7180
|
}
|
|
7171
|
-
async function
|
|
7172
|
-
|
|
7173
|
-
let [n, r] = await Promise.all([
|
|
7181
|
+
async function Ca(e, t) {
|
|
7182
|
+
q(`${e} Build presenter project configuration`);
|
|
7183
|
+
let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(ga, n);
|
|
7174
7184
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
|
|
7175
|
-
return await
|
|
7185
|
+
return await wa(t, n, Un(r));
|
|
7176
7186
|
}
|
|
7177
|
-
async function
|
|
7178
|
-
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, await
|
|
7187
|
+
async function wa(e, t, n, r) {
|
|
7188
|
+
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;
|
|
7179
7189
|
}
|
|
7180
|
-
async function
|
|
7190
|
+
async function Ta() {
|
|
7181
7191
|
try {
|
|
7182
|
-
|
|
7183
|
-
let e = await
|
|
7184
|
-
switch (await
|
|
7192
|
+
G("Synchronise Project with GitHub");
|
|
7193
|
+
let e = await U("package.json"), t = await U("config.json");
|
|
7194
|
+
switch (await Da("1️⃣ ", e), Vn(t.id).typeId) {
|
|
7185
7195
|
case "connector":
|
|
7186
|
-
await
|
|
7196
|
+
await xa("2️⃣ ", e);
|
|
7187
7197
|
break;
|
|
7188
7198
|
case "context":
|
|
7189
|
-
await
|
|
7199
|
+
await Sa("2️⃣ ", e);
|
|
7190
7200
|
break;
|
|
7191
7201
|
case "presenter":
|
|
7192
|
-
await
|
|
7202
|
+
await Ca("2️⃣ ", e);
|
|
7193
7203
|
break;
|
|
7194
|
-
default: await
|
|
7204
|
+
default: await ba("2️⃣ ", e);
|
|
7195
7205
|
}
|
|
7196
|
-
await
|
|
7206
|
+
await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
|
|
7197
7207
|
"commit",
|
|
7198
7208
|
"-m",
|
|
7199
7209
|
`v${e.version ?? "unknown"}`
|
|
7200
|
-
]), await
|
|
7210
|
+
]), await Fn("5️⃣ Push changes", "git", [
|
|
7201
7211
|
"push",
|
|
7202
7212
|
"origin",
|
|
7203
7213
|
"main:main"
|
|
7204
|
-
]),
|
|
7214
|
+
]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
|
|
7205
7215
|
} catch (e) {
|
|
7206
7216
|
console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
|
|
7207
7217
|
}
|
|
7208
7218
|
}
|
|
7209
|
-
function
|
|
7219
|
+
function Ea() {
|
|
7210
7220
|
try {
|
|
7211
|
-
|
|
7221
|
+
G("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
7212
7222
|
} catch (e) {
|
|
7213
7223
|
console.error("❌ Error testing project", e), process.exit(1);
|
|
7214
7224
|
}
|
|
7215
7225
|
}
|
|
7216
|
-
async function
|
|
7217
|
-
if (
|
|
7226
|
+
async function Da(e, t, n = "./") {
|
|
7227
|
+
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
7218
7228
|
else {
|
|
7219
7229
|
let e = t.version, n = t.version.split(".");
|
|
7220
7230
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
7221
7231
|
}
|
|
7222
|
-
await
|
|
7232
|
+
await zn(`${n}package.json`, t);
|
|
7223
7233
|
}
|
|
7224
7234
|
//#endregion
|
|
7225
|
-
export {
|
|
7235
|
+
export { Kn as auditDependencies, _a as buildProject, qn as checkConfigFiles, $n as checkDependencies, Vi as documentActions, ar as documentBundleSizes, Dr as documentDependencies, Br as documentGovernance, Wi as documentOpening, Zi as documentUsage, na as formatCode, ra as lintCode, va as publishProject, ya as releaseProject, Ta as syncProjectWithGitHub, Ea as testProject, aa as uploadDirectoryToR2 };
|
|
7226
7236
|
|
|
7227
7237
|
//# sourceMappingURL=dpuse-development.es.js.map
|