saasfunnels 0.3.4 → 0.4.1
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 +31 -4
- package/dist/library.js +879 -829
- package/dist/saasfunnels.js +1829 -1700
- package/dist/types/identity.d.ts +1 -1
- package/dist/types/mcp.d.ts +1 -1
- package/dist/types/setup-commercial.d.ts +63 -0
- package/dist/types/setup-pricing.d.ts +4 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -24,9 +24,9 @@ var __export = (target, all) => {
|
|
|
24
24
|
};
|
|
25
25
|
var __copyProps = (to, from, except, desc) => {
|
|
26
26
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
-
for (let
|
|
28
|
-
if (!__hasOwnProp.call(to,
|
|
29
|
-
__defProp(to,
|
|
27
|
+
for (let key3 of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key3) && key3 !== except)
|
|
29
|
+
__defProp(to, key3, { get: () => from[key3], enumerable: !(desc = __getOwnPropDesc(from, key3)) || desc.enumerable });
|
|
30
30
|
}
|
|
31
31
|
return to;
|
|
32
32
|
};
|
|
@@ -55,9 +55,9 @@ var require_typescript = __commonJS({
|
|
|
55
55
|
};
|
|
56
56
|
var __copyProps2 = (to, from, except, desc) => {
|
|
57
57
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
58
|
-
for (let
|
|
59
|
-
if (!__hasOwnProp2.call(to,
|
|
60
|
-
__defProp2(to,
|
|
58
|
+
for (let key3 of __getOwnPropNames2(from))
|
|
59
|
+
if (!__hasOwnProp2.call(to, key3) && key3 !== except)
|
|
60
|
+
__defProp2(to, key3, { get: () => from[key3], enumerable: !(desc = __getOwnPropDesc2(from, key3)) || desc.enumerable });
|
|
61
61
|
}
|
|
62
62
|
return to;
|
|
63
63
|
};
|
|
@@ -2647,12 +2647,12 @@ var require_typescript = __commonJS({
|
|
|
2647
2647
|
}
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
function getOrUpdate(map22,
|
|
2651
|
-
if (map22.has(
|
|
2652
|
-
return map22.get(
|
|
2650
|
+
function getOrUpdate(map22, key3, callback) {
|
|
2651
|
+
if (map22.has(key3)) {
|
|
2652
|
+
return map22.get(key3);
|
|
2653
2653
|
}
|
|
2654
2654
|
const value = callback();
|
|
2655
|
-
map22.set(
|
|
2655
|
+
map22.set(key3, value);
|
|
2656
2656
|
return value;
|
|
2657
2657
|
}
|
|
2658
2658
|
function tryAddToSet(set2, value) {
|
|
@@ -2671,16 +2671,16 @@ var require_typescript = __commonJS({
|
|
|
2671
2671
|
result = [];
|
|
2672
2672
|
const len = array2.length;
|
|
2673
2673
|
let previousKey;
|
|
2674
|
-
let
|
|
2674
|
+
let key3;
|
|
2675
2675
|
let start = 0;
|
|
2676
2676
|
let pos = 0;
|
|
2677
2677
|
while (start < len) {
|
|
2678
2678
|
while (pos < len) {
|
|
2679
2679
|
const value = array2[pos];
|
|
2680
|
-
|
|
2680
|
+
key3 = keyfn(value, pos);
|
|
2681
2681
|
if (pos === 0) {
|
|
2682
|
-
previousKey =
|
|
2683
|
-
} else if (
|
|
2682
|
+
previousKey = key3;
|
|
2683
|
+
} else if (key3 !== previousKey) {
|
|
2684
2684
|
break;
|
|
2685
2685
|
}
|
|
2686
2686
|
pos++;
|
|
@@ -2692,7 +2692,7 @@ var require_typescript = __commonJS({
|
|
|
2692
2692
|
}
|
|
2693
2693
|
start = pos;
|
|
2694
2694
|
}
|
|
2695
|
-
previousKey =
|
|
2695
|
+
previousKey = key3;
|
|
2696
2696
|
pos++;
|
|
2697
2697
|
}
|
|
2698
2698
|
}
|
|
@@ -2703,8 +2703,8 @@ var require_typescript = __commonJS({
|
|
|
2703
2703
|
return void 0;
|
|
2704
2704
|
}
|
|
2705
2705
|
const result = /* @__PURE__ */ new Map();
|
|
2706
|
-
map22.forEach((value,
|
|
2707
|
-
const [newKey, newValue] = f(
|
|
2706
|
+
map22.forEach((value, key3) => {
|
|
2707
|
+
const [newKey, newValue] = f(key3, value);
|
|
2708
2708
|
result.set(newKey, newValue);
|
|
2709
2709
|
});
|
|
2710
2710
|
return result;
|
|
@@ -3007,7 +3007,7 @@ var require_typescript = __commonJS({
|
|
|
3007
3007
|
function binarySearch(array2, value, keySelector, keyComparer, offset) {
|
|
3008
3008
|
return binarySearchKey(array2, keySelector(value), keySelector, keyComparer, offset);
|
|
3009
3009
|
}
|
|
3010
|
-
function binarySearchKey(array2,
|
|
3010
|
+
function binarySearchKey(array2, key3, keySelector, keyComparer, offset) {
|
|
3011
3011
|
if (!some(array2)) {
|
|
3012
3012
|
return -1;
|
|
3013
3013
|
}
|
|
@@ -3016,7 +3016,7 @@ var require_typescript = __commonJS({
|
|
|
3016
3016
|
while (low <= high) {
|
|
3017
3017
|
const middle = low + (high - low >> 1);
|
|
3018
3018
|
const midKey = keySelector(array2[middle], middle);
|
|
3019
|
-
switch (Math.sign(keyComparer(midKey,
|
|
3019
|
+
switch (Math.sign(keyComparer(midKey, key3))) {
|
|
3020
3020
|
case -1:
|
|
3021
3021
|
low = middle + 1;
|
|
3022
3022
|
break;
|
|
@@ -3052,17 +3052,17 @@ var require_typescript = __commonJS({
|
|
|
3052
3052
|
return initial;
|
|
3053
3053
|
}
|
|
3054
3054
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3055
|
-
function hasProperty(map22,
|
|
3056
|
-
return hasOwnProperty.call(map22,
|
|
3055
|
+
function hasProperty(map22, key3) {
|
|
3056
|
+
return hasOwnProperty.call(map22, key3);
|
|
3057
3057
|
}
|
|
3058
|
-
function getProperty(map22,
|
|
3059
|
-
return hasOwnProperty.call(map22,
|
|
3058
|
+
function getProperty(map22, key3) {
|
|
3059
|
+
return hasOwnProperty.call(map22, key3) ? map22[key3] : void 0;
|
|
3060
3060
|
}
|
|
3061
3061
|
function getOwnKeys(map22) {
|
|
3062
3062
|
const keys = [];
|
|
3063
|
-
for (const
|
|
3064
|
-
if (hasOwnProperty.call(map22,
|
|
3065
|
-
keys.push(
|
|
3063
|
+
for (const key3 in map22) {
|
|
3064
|
+
if (hasOwnProperty.call(map22, key3)) {
|
|
3065
|
+
keys.push(key3);
|
|
3066
3066
|
}
|
|
3067
3067
|
}
|
|
3068
3068
|
return keys;
|
|
@@ -3079,9 +3079,9 @@ var require_typescript = __commonJS({
|
|
|
3079
3079
|
}
|
|
3080
3080
|
function getOwnValues(collection) {
|
|
3081
3081
|
const values = [];
|
|
3082
|
-
for (const
|
|
3083
|
-
if (hasOwnProperty.call(collection,
|
|
3084
|
-
values.push(collection[
|
|
3082
|
+
for (const key3 in collection) {
|
|
3083
|
+
if (hasOwnProperty.call(collection, key3)) {
|
|
3084
|
+
values.push(collection[key3]);
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
3087
3087
|
return values;
|
|
@@ -3114,15 +3114,15 @@ var require_typescript = __commonJS({
|
|
|
3114
3114
|
function equalOwnProperties(left, right, equalityComparer = equateValues) {
|
|
3115
3115
|
if (left === right) return true;
|
|
3116
3116
|
if (!left || !right) return false;
|
|
3117
|
-
for (const
|
|
3118
|
-
if (hasOwnProperty.call(left,
|
|
3119
|
-
if (!hasOwnProperty.call(right,
|
|
3120
|
-
if (!equalityComparer(left[
|
|
3117
|
+
for (const key3 in left) {
|
|
3118
|
+
if (hasOwnProperty.call(left, key3)) {
|
|
3119
|
+
if (!hasOwnProperty.call(right, key3)) return false;
|
|
3120
|
+
if (!equalityComparer(left[key3], right[key3])) return false;
|
|
3121
3121
|
}
|
|
3122
3122
|
}
|
|
3123
|
-
for (const
|
|
3124
|
-
if (hasOwnProperty.call(right,
|
|
3125
|
-
if (!hasOwnProperty.call(left,
|
|
3123
|
+
for (const key3 in right) {
|
|
3124
|
+
if (hasOwnProperty.call(right, key3)) {
|
|
3125
|
+
if (!hasOwnProperty.call(left, key3)) return false;
|
|
3126
3126
|
}
|
|
3127
3127
|
}
|
|
3128
3128
|
return true;
|
|
@@ -3131,8 +3131,8 @@ var require_typescript = __commonJS({
|
|
|
3131
3131
|
const result = /* @__PURE__ */ new Map();
|
|
3132
3132
|
for (let i = 0; i < array2.length; i++) {
|
|
3133
3133
|
const value = array2[i];
|
|
3134
|
-
const
|
|
3135
|
-
if (
|
|
3134
|
+
const key3 = makeKey(value);
|
|
3135
|
+
if (key3 !== void 0) result.set(key3, makeValue(value));
|
|
3136
3136
|
}
|
|
3137
3137
|
return result;
|
|
3138
3138
|
}
|
|
@@ -3160,8 +3160,8 @@ var require_typescript = __commonJS({
|
|
|
3160
3160
|
if (values !== void 0) {
|
|
3161
3161
|
for (let i = 0; i < values.length; i++) {
|
|
3162
3162
|
const value = values[i];
|
|
3163
|
-
const
|
|
3164
|
-
const array2 = result[
|
|
3163
|
+
const key3 = `${keySelector(value)}`;
|
|
3164
|
+
const array2 = result[key3] ?? (result[key3] = []);
|
|
3165
3165
|
array2.push(value);
|
|
3166
3166
|
}
|
|
3167
3167
|
}
|
|
@@ -3206,21 +3206,21 @@ var require_typescript = __commonJS({
|
|
|
3206
3206
|
map22.remove = multiMapRemove;
|
|
3207
3207
|
return map22;
|
|
3208
3208
|
}
|
|
3209
|
-
function multiMapAdd(
|
|
3210
|
-
let values = this.get(
|
|
3209
|
+
function multiMapAdd(key3, value) {
|
|
3210
|
+
let values = this.get(key3);
|
|
3211
3211
|
if (values !== void 0) {
|
|
3212
3212
|
values.push(value);
|
|
3213
3213
|
} else {
|
|
3214
|
-
this.set(
|
|
3214
|
+
this.set(key3, values = [value]);
|
|
3215
3215
|
}
|
|
3216
3216
|
return values;
|
|
3217
3217
|
}
|
|
3218
|
-
function multiMapRemove(
|
|
3219
|
-
const values = this.get(
|
|
3218
|
+
function multiMapRemove(key3, value) {
|
|
3219
|
+
const values = this.get(key3);
|
|
3220
3220
|
if (values !== void 0) {
|
|
3221
3221
|
unorderedRemoveItem(values, value);
|
|
3222
3222
|
if (!values.length) {
|
|
3223
|
-
this.delete(
|
|
3223
|
+
this.delete(key3);
|
|
3224
3224
|
}
|
|
3225
3225
|
}
|
|
3226
3226
|
}
|
|
@@ -3422,11 +3422,11 @@ var require_typescript = __commonJS({
|
|
|
3422
3422
|
function memoizeOne(callback) {
|
|
3423
3423
|
const map22 = /* @__PURE__ */ new Map();
|
|
3424
3424
|
return (arg) => {
|
|
3425
|
-
const
|
|
3426
|
-
let value = map22.get(
|
|
3427
|
-
if (value === void 0 && !map22.has(
|
|
3425
|
+
const key3 = `${typeof arg}:${arg}`;
|
|
3426
|
+
let value = map22.get(key3);
|
|
3427
|
+
if (value === void 0 && !map22.has(key3)) {
|
|
3428
3428
|
value = callback(arg);
|
|
3429
|
-
map22.set(
|
|
3429
|
+
map22.set(key3, value);
|
|
3430
3430
|
}
|
|
3431
3431
|
return value;
|
|
3432
3432
|
};
|
|
@@ -3516,8 +3516,8 @@ var require_typescript = __commonJS({
|
|
|
3516
3516
|
uiComparerCaseSensitive ?? (uiComparerCaseSensitive = createUIStringComparer(uiLocale));
|
|
3517
3517
|
return uiComparerCaseSensitive(a, b);
|
|
3518
3518
|
}
|
|
3519
|
-
function compareProperties(a, b,
|
|
3520
|
-
return a === b ? 0 : a === void 0 ? -1 : b === void 0 ? 1 : comparer(a[
|
|
3519
|
+
function compareProperties(a, b, key3, comparer) {
|
|
3520
|
+
return a === b ? 0 : a === void 0 ? -1 : b === void 0 ? 1 : comparer(a[key3], b[key3]);
|
|
3521
3521
|
}
|
|
3522
3522
|
function compareBooleans(a, b) {
|
|
3523
3523
|
return compareValues(a ? 1 : 0, b ? 1 : 0);
|
|
@@ -3857,11 +3857,11 @@ var require_typescript = __commonJS({
|
|
|
3857
3857
|
const prevAssertionLevel = currentAssertionLevel;
|
|
3858
3858
|
currentAssertionLevel = level;
|
|
3859
3859
|
if (level > prevAssertionLevel) {
|
|
3860
|
-
for (const
|
|
3861
|
-
const cachedFunc = assertionCache[
|
|
3862
|
-
if (cachedFunc !== void 0 && Debug2[
|
|
3863
|
-
Debug2[
|
|
3864
|
-
assertionCache[
|
|
3860
|
+
for (const key3 of getOwnKeys(assertionCache)) {
|
|
3861
|
+
const cachedFunc = assertionCache[key3];
|
|
3862
|
+
if (cachedFunc !== void 0 && Debug2[key3] !== cachedFunc.assertion && level >= cachedFunc.level) {
|
|
3863
|
+
Debug2[key3] = cachedFunc;
|
|
3864
|
+
assertionCache[key3] = void 0;
|
|
3865
3865
|
}
|
|
3866
3866
|
}
|
|
3867
3867
|
}
|
|
@@ -9498,8 +9498,8 @@ ${lanes.join("\n")}
|
|
|
9498
9498
|
function isNodeModulesDirectory(dirPath) {
|
|
9499
9499
|
return endsWith(dirPath, "/node_modules");
|
|
9500
9500
|
}
|
|
9501
|
-
function diag(code, category,
|
|
9502
|
-
return { code, category, key:
|
|
9501
|
+
function diag(code, category, key3, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated) {
|
|
9502
|
+
return { code, category, key: key3, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated };
|
|
9503
9503
|
}
|
|
9504
9504
|
var Diagnostics = {
|
|
9505
9505
|
Unterminated_string_literal: diag(1002, 1, "Unterminated_string_literal_1002", "Unterminated string literal."),
|
|
@@ -16790,8 +16790,8 @@ ${lanes.join("\n")}
|
|
|
16790
16790
|
}
|
|
16791
16791
|
function forEachEntry(map22, callback) {
|
|
16792
16792
|
const iterator = map22.entries();
|
|
16793
|
-
for (const [
|
|
16794
|
-
const result = callback(value,
|
|
16793
|
+
for (const [key3, value] of iterator) {
|
|
16794
|
+
const result = callback(value, key3);
|
|
16795
16795
|
if (result) {
|
|
16796
16796
|
return result;
|
|
16797
16797
|
}
|
|
@@ -16800,8 +16800,8 @@ ${lanes.join("\n")}
|
|
|
16800
16800
|
}
|
|
16801
16801
|
function forEachKey(map22, callback) {
|
|
16802
16802
|
const iterator = map22.keys();
|
|
16803
|
-
for (const
|
|
16804
|
-
const result = callback(
|
|
16803
|
+
for (const key3 of iterator) {
|
|
16804
|
+
const result = callback(key3);
|
|
16805
16805
|
if (result) {
|
|
16806
16806
|
return result;
|
|
16807
16807
|
}
|
|
@@ -16809,8 +16809,8 @@ ${lanes.join("\n")}
|
|
|
16809
16809
|
return void 0;
|
|
16810
16810
|
}
|
|
16811
16811
|
function copyEntries(source, target) {
|
|
16812
|
-
source.forEach((value,
|
|
16813
|
-
target.set(
|
|
16812
|
+
source.forEach((value, key3) => {
|
|
16813
|
+
target.set(key3, value);
|
|
16814
16814
|
});
|
|
16815
16815
|
}
|
|
16816
16816
|
function usingSingleLineStringWriter(action) {
|
|
@@ -18604,11 +18604,11 @@ ${lanes.join("\n")}
|
|
|
18604
18604
|
function isThisTypePredicate(predicate) {
|
|
18605
18605
|
return predicate && predicate.kind === 0;
|
|
18606
18606
|
}
|
|
18607
|
-
function forEachPropertyAssignment(objectLiteral,
|
|
18607
|
+
function forEachPropertyAssignment(objectLiteral, key3, callback, key22) {
|
|
18608
18608
|
return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property) => {
|
|
18609
18609
|
if (!isPropertyAssignment(property)) return void 0;
|
|
18610
18610
|
const propName = tryGetTextOfPropertyName(property.name);
|
|
18611
|
-
return
|
|
18611
|
+
return key3 === propName || key22 && key22 === propName ? callback(property) : void 0;
|
|
18612
18612
|
});
|
|
18613
18613
|
}
|
|
18614
18614
|
function getTsConfigObjectLiteralExpression(tsConfigSourceFile) {
|
|
@@ -22027,22 +22027,22 @@ ${lanes.join("\n")}
|
|
|
22027
22027
|
}
|
|
22028
22028
|
function mutateMapSkippingNewValues(map22, newMap, options) {
|
|
22029
22029
|
const { onDeleteValue, onExistingValue } = options;
|
|
22030
|
-
map22.forEach((existingValue,
|
|
22030
|
+
map22.forEach((existingValue, key3) => {
|
|
22031
22031
|
var _a3;
|
|
22032
|
-
if (!(newMap == null ? void 0 : newMap.has(
|
|
22033
|
-
map22.delete(
|
|
22034
|
-
onDeleteValue(existingValue,
|
|
22032
|
+
if (!(newMap == null ? void 0 : newMap.has(key3))) {
|
|
22033
|
+
map22.delete(key3);
|
|
22034
|
+
onDeleteValue(existingValue, key3);
|
|
22035
22035
|
} else if (onExistingValue) {
|
|
22036
|
-
onExistingValue(existingValue, (_a3 = newMap.get) == null ? void 0 : _a3.call(newMap,
|
|
22036
|
+
onExistingValue(existingValue, (_a3 = newMap.get) == null ? void 0 : _a3.call(newMap, key3), key3);
|
|
22037
22037
|
}
|
|
22038
22038
|
});
|
|
22039
22039
|
}
|
|
22040
22040
|
function mutateMap(map22, newMap, options) {
|
|
22041
22041
|
mutateMapSkippingNewValues(map22, newMap, options);
|
|
22042
22042
|
const { createNewValue } = options;
|
|
22043
|
-
newMap == null ? void 0 : newMap.forEach((valueInNewMap,
|
|
22044
|
-
if (!map22.has(
|
|
22045
|
-
map22.set(
|
|
22043
|
+
newMap == null ? void 0 : newMap.forEach((valueInNewMap, key3) => {
|
|
22044
|
+
if (!map22.has(key3)) {
|
|
22045
|
+
map22.set(key3, createNewValue(key3, valueInNewMap));
|
|
22046
22046
|
}
|
|
22047
22047
|
});
|
|
22048
22048
|
}
|
|
@@ -22084,11 +22084,11 @@ ${lanes.join("\n")}
|
|
|
22084
22084
|
});
|
|
22085
22085
|
return lastChild;
|
|
22086
22086
|
}
|
|
22087
|
-
function addToSeen(seen,
|
|
22088
|
-
if (seen.has(
|
|
22087
|
+
function addToSeen(seen, key3) {
|
|
22088
|
+
if (seen.has(key3)) {
|
|
22089
22089
|
return false;
|
|
22090
22090
|
}
|
|
22091
|
-
seen.add(
|
|
22091
|
+
seen.add(key3);
|
|
22092
22092
|
return true;
|
|
22093
22093
|
}
|
|
22094
22094
|
function isObjectTypeDeclaration(node) {
|
|
@@ -22861,7 +22861,7 @@ ${lanes.join("\n")}
|
|
|
22861
22861
|
return compilerOptions[flag] === void 0 ? compilerOptions.strict !== false : !!compilerOptions[flag];
|
|
22862
22862
|
}
|
|
22863
22863
|
function getNameOfScriptTarget(scriptTarget) {
|
|
22864
|
-
return forEachEntry(targetOptionDeclaration.type, (value,
|
|
22864
|
+
return forEachEntry(targetOptionDeclaration.type, (value, key3) => value === scriptTarget ? key3 : void 0);
|
|
22865
22865
|
}
|
|
22866
22866
|
function getEmitStandardClassFields(compilerOptions) {
|
|
22867
22867
|
return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9;
|
|
@@ -30137,11 +30137,11 @@ ${lanes.join("\n")}
|
|
|
30137
30137
|
clone22.flags |= node.flags & ~16;
|
|
30138
30138
|
clone22.transformFlags = node.transformFlags;
|
|
30139
30139
|
setOriginal(clone22, node);
|
|
30140
|
-
for (const
|
|
30141
|
-
if (hasProperty(clone22,
|
|
30140
|
+
for (const key3 in node) {
|
|
30141
|
+
if (hasProperty(clone22, key3) || !hasProperty(node, key3)) {
|
|
30142
30142
|
continue;
|
|
30143
30143
|
}
|
|
30144
|
-
clone22[
|
|
30144
|
+
clone22[key3] = node[key3];
|
|
30145
30145
|
}
|
|
30146
30146
|
return clone22;
|
|
30147
30147
|
}
|
|
@@ -30983,8 +30983,8 @@ ${lanes.join("\n")}
|
|
|
30983
30983
|
}
|
|
30984
30984
|
function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
|
|
30985
30985
|
if (!destRanges) destRanges = [];
|
|
30986
|
-
for (const
|
|
30987
|
-
destRanges[
|
|
30986
|
+
for (const key3 in sourceRanges) {
|
|
30987
|
+
destRanges[key3] = sourceRanges[key3];
|
|
30988
30988
|
}
|
|
30989
30989
|
return destRanges;
|
|
30990
30990
|
}
|
|
@@ -43658,8 +43658,8 @@ ${lanes.join("\n")}
|
|
|
43658
43658
|
context.typeReferenceDirectives = [];
|
|
43659
43659
|
context.libReferenceDirectives = [];
|
|
43660
43660
|
context.amdDependencies = [];
|
|
43661
|
-
context.pragmas.forEach((entryOrList,
|
|
43662
|
-
switch (
|
|
43661
|
+
context.pragmas.forEach((entryOrList, key3) => {
|
|
43662
|
+
switch (key3) {
|
|
43663
43663
|
case "reference": {
|
|
43664
43664
|
const referencedFiles = context.referencedFiles;
|
|
43665
43665
|
const typeReferenceDirectives = context.typeReferenceDirectives;
|
|
@@ -43706,7 +43706,7 @@ ${lanes.join("\n")}
|
|
|
43706
43706
|
forEach(toArray(entryOrList), (entry) => {
|
|
43707
43707
|
if (!context.checkJsDirective || entry.range.pos > context.checkJsDirective.pos) {
|
|
43708
43708
|
context.checkJsDirective = {
|
|
43709
|
-
enabled:
|
|
43709
|
+
enabled: key3 === "ts-check",
|
|
43710
43710
|
end: entry.range.end,
|
|
43711
43711
|
pos: entry.range.pos
|
|
43712
43712
|
};
|
|
@@ -43841,7 +43841,7 @@ ${lanes.join("\n")}
|
|
|
43841
43841
|
"react": 2
|
|
43842
43842
|
/* React */
|
|
43843
43843
|
}));
|
|
43844
|
-
var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([
|
|
43844
|
+
var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key3, value]) => ["" + value, key3]));
|
|
43845
43845
|
var libEntries = [
|
|
43846
43846
|
// JavaScript only
|
|
43847
43847
|
["es5", "lib.es5.d.ts"],
|
|
@@ -45490,7 +45490,7 @@ ${lanes.join("\n")}
|
|
|
45490
45490
|
}
|
|
45491
45491
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
45492
45492
|
const namesOfType = arrayFrom(opt.type.keys());
|
|
45493
|
-
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((
|
|
45493
|
+
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key3) => `'${key3}'`).join(", ");
|
|
45494
45494
|
return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
|
|
45495
45495
|
}
|
|
45496
45496
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -46164,9 +46164,9 @@ ${lanes.join("\n")}
|
|
|
46164
46164
|
}
|
|
46165
46165
|
}
|
|
46166
46166
|
function getNameOfCompilerOptionValue(value, customTypeMap) {
|
|
46167
|
-
return forEachEntry(customTypeMap, (mapValue,
|
|
46167
|
+
return forEachEntry(customTypeMap, (mapValue, key3) => {
|
|
46168
46168
|
if (mapValue === value) {
|
|
46169
|
-
return
|
|
46169
|
+
return key3;
|
|
46170
46170
|
}
|
|
46171
46171
|
});
|
|
46172
46172
|
}
|
|
@@ -46703,11 +46703,11 @@ ${lanes.join("\n")}
|
|
|
46703
46703
|
function getSubstitutedMapLikeOfStringArrayWithConfigDirTemplate(mapLike, basePath) {
|
|
46704
46704
|
let result;
|
|
46705
46705
|
const ownKeys = getOwnKeys(mapLike);
|
|
46706
|
-
ownKeys.forEach((
|
|
46707
|
-
if (!isArray(mapLike[
|
|
46708
|
-
const subStitution = getSubstitutedStringArrayWithConfigDirTemplate(mapLike[
|
|
46706
|
+
ownKeys.forEach((key3) => {
|
|
46707
|
+
if (!isArray(mapLike[key3])) return;
|
|
46708
|
+
const subStitution = getSubstitutedStringArrayWithConfigDirTemplate(mapLike[key3], basePath);
|
|
46709
46709
|
if (!subStitution) return;
|
|
46710
|
-
(result ?? (result = assign({}, mapLike)))[
|
|
46710
|
+
(result ?? (result = assign({}, mapLike)))[key3] = subStitution;
|
|
46711
46711
|
});
|
|
46712
46712
|
return result;
|
|
46713
46713
|
}
|
|
@@ -47080,8 +47080,8 @@ ${lanes.join("\n")}
|
|
|
47080
47080
|
}
|
|
47081
47081
|
function convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile) {
|
|
47082
47082
|
if (isNullOrUndefined(value)) return void 0;
|
|
47083
|
-
const
|
|
47084
|
-
const val = opt.type.get(
|
|
47083
|
+
const key3 = value.toLowerCase();
|
|
47084
|
+
const val = opt.type.get(key3);
|
|
47085
47085
|
if (val !== void 0) {
|
|
47086
47086
|
return validateJsonOptionValue(opt, val, errors, valueExpression, sourceFile);
|
|
47087
47087
|
} else {
|
|
@@ -47145,9 +47145,9 @@ ${lanes.join("\n")}
|
|
|
47145
47145
|
continue;
|
|
47146
47146
|
}
|
|
47147
47147
|
removeWildcardFilesWithLowerPriorityExtension(file2, wildcardFileMap, supportedExtensions, keyMapper);
|
|
47148
|
-
const
|
|
47149
|
-
if (!literalFileMap.has(
|
|
47150
|
-
wildcardFileMap.set(
|
|
47148
|
+
const key3 = keyMapper(file2);
|
|
47149
|
+
if (!literalFileMap.has(key3) && !wildcardFileMap.has(key3)) {
|
|
47150
|
+
wildcardFileMap.set(key3, file2);
|
|
47151
47151
|
}
|
|
47152
47152
|
}
|
|
47153
47153
|
}
|
|
@@ -47226,14 +47226,14 @@ ${lanes.join("\n")}
|
|
|
47226
47226
|
}
|
|
47227
47227
|
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
47228
47228
|
if (match) {
|
|
47229
|
-
const { key:
|
|
47230
|
-
const existingPath = wildCardKeyToPath.get(
|
|
47229
|
+
const { key: key3, path, flags } = match;
|
|
47230
|
+
const existingPath = wildCardKeyToPath.get(key3);
|
|
47231
47231
|
const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
|
|
47232
47232
|
if (existingFlags === void 0 || existingFlags < flags) {
|
|
47233
47233
|
wildcardDirectories[existingPath !== void 0 ? existingPath : path] = flags;
|
|
47234
|
-
if (existingPath === void 0) wildCardKeyToPath.set(
|
|
47234
|
+
if (existingPath === void 0) wildCardKeyToPath.set(key3, path);
|
|
47235
47235
|
if (flags === 1) {
|
|
47236
|
-
recursiveKeys.push(
|
|
47236
|
+
recursiveKeys.push(key3);
|
|
47237
47237
|
}
|
|
47238
47238
|
}
|
|
47239
47239
|
}
|
|
@@ -47241,8 +47241,8 @@ ${lanes.join("\n")}
|
|
|
47241
47241
|
for (const path in wildcardDirectories) {
|
|
47242
47242
|
if (hasProperty(wildcardDirectories, path)) {
|
|
47243
47243
|
for (const recursiveKey of recursiveKeys) {
|
|
47244
|
-
const
|
|
47245
|
-
if (
|
|
47244
|
+
const key3 = toCanonicalKey(path, useCaseSensitiveFileNames2);
|
|
47245
|
+
if (key3 !== recursiveKey && containsPath(recursiveKey, key3, basePath, !useCaseSensitiveFileNames2)) {
|
|
47246
47246
|
delete wildcardDirectories[path];
|
|
47247
47247
|
}
|
|
47248
47248
|
}
|
|
@@ -47325,11 +47325,11 @@ ${lanes.join("\n")}
|
|
|
47325
47325
|
}
|
|
47326
47326
|
function convertCompilerOptionsForTelemetry(opts) {
|
|
47327
47327
|
const out = {};
|
|
47328
|
-
for (const
|
|
47329
|
-
if (hasProperty(opts,
|
|
47330
|
-
const type = getOptionFromName(
|
|
47328
|
+
for (const key3 in opts) {
|
|
47329
|
+
if (hasProperty(opts, key3)) {
|
|
47330
|
+
const type = getOptionFromName(key3);
|
|
47331
47331
|
if (type !== void 0) {
|
|
47332
|
-
out[
|
|
47332
|
+
out[key3] = getOptionValueWithEmptyStrings(opts[key3], type);
|
|
47333
47333
|
}
|
|
47334
47334
|
}
|
|
47335
47335
|
}
|
|
@@ -47537,9 +47537,9 @@ ${lanes.join("\n")}
|
|
|
47537
47537
|
const typesVersions = readPackageJsonTypesVersionsField(jsonContent, state);
|
|
47538
47538
|
if (typesVersions === void 0) return;
|
|
47539
47539
|
if (state.traceEnabled) {
|
|
47540
|
-
for (const
|
|
47541
|
-
if (hasProperty(typesVersions,
|
|
47542
|
-
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,
|
|
47540
|
+
for (const key3 in typesVersions) {
|
|
47541
|
+
if (hasProperty(typesVersions, key3) && !VersionRange.tryParse(key3)) {
|
|
47542
|
+
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, key3);
|
|
47543
47543
|
}
|
|
47544
47544
|
}
|
|
47545
47545
|
}
|
|
@@ -47562,14 +47562,14 @@ ${lanes.join("\n")}
|
|
|
47562
47562
|
var typeScriptVersion;
|
|
47563
47563
|
function getPackageJsonTypesVersionsPaths(typesVersions) {
|
|
47564
47564
|
if (!typeScriptVersion) typeScriptVersion = new Version(version2);
|
|
47565
|
-
for (const
|
|
47566
|
-
if (!hasProperty(typesVersions,
|
|
47567
|
-
const keyRange = VersionRange.tryParse(
|
|
47565
|
+
for (const key3 in typesVersions) {
|
|
47566
|
+
if (!hasProperty(typesVersions, key3)) continue;
|
|
47567
|
+
const keyRange = VersionRange.tryParse(key3);
|
|
47568
47568
|
if (keyRange === void 0) {
|
|
47569
47569
|
continue;
|
|
47570
47570
|
}
|
|
47571
47571
|
if (keyRange.test(typeScriptVersion)) {
|
|
47572
|
-
return { version:
|
|
47572
|
+
return { version: key3, paths: typesVersions[key3] };
|
|
47573
47573
|
}
|
|
47574
47574
|
}
|
|
47575
47575
|
}
|
|
@@ -47904,9 +47904,9 @@ ${lanes.join("\n")}
|
|
|
47904
47904
|
return `[${(_a3 = value.map((e) => compilerOptionValueToString(e))) == null ? void 0 : _a3.join(",")}]`;
|
|
47905
47905
|
}
|
|
47906
47906
|
let str = "{";
|
|
47907
|
-
for (const
|
|
47908
|
-
if (hasProperty(value,
|
|
47909
|
-
str += `${
|
|
47907
|
+
for (const key3 in value) {
|
|
47908
|
+
if (hasProperty(value, key3)) {
|
|
47909
|
+
str += `${key3}: ${compilerOptionValueToString(value[key3])}`;
|
|
47910
47910
|
}
|
|
47911
47911
|
}
|
|
47912
47912
|
return str + "}";
|
|
@@ -47954,16 +47954,16 @@ ${lanes.join("\n")}
|
|
|
47954
47954
|
function getOrCreateMap(redirectOptions, create) {
|
|
47955
47955
|
let result = redirectsMap.get(redirectOptions);
|
|
47956
47956
|
if (result) return result;
|
|
47957
|
-
const
|
|
47958
|
-
result = redirectsKeyToMap.get(
|
|
47957
|
+
const key3 = getRedirectsCacheKey(redirectOptions);
|
|
47958
|
+
result = redirectsKeyToMap.get(key3);
|
|
47959
47959
|
if (!result) {
|
|
47960
47960
|
if (ownOptions) {
|
|
47961
47961
|
const ownKey = getRedirectsCacheKey(ownOptions);
|
|
47962
|
-
if (ownKey ===
|
|
47962
|
+
if (ownKey === key3) result = ownMap;
|
|
47963
47963
|
else if (!redirectsKeyToMap.has(ownKey)) redirectsKeyToMap.set(ownKey, ownMap);
|
|
47964
47964
|
}
|
|
47965
47965
|
if (create) result ?? (result = /* @__PURE__ */ new Map());
|
|
47966
|
-
if (result) redirectsKeyToMap.set(
|
|
47966
|
+
if (result) redirectsKeyToMap.set(key3, result);
|
|
47967
47967
|
}
|
|
47968
47968
|
if (result) redirectsMap.set(redirectOptions, result);
|
|
47969
47969
|
return result;
|
|
@@ -48003,12 +48003,12 @@ ${lanes.join("\n")}
|
|
|
48003
48003
|
return cache;
|
|
48004
48004
|
}
|
|
48005
48005
|
}
|
|
48006
|
-
function getOrCreateCache(cacheWithRedirects, redirectedReference,
|
|
48006
|
+
function getOrCreateCache(cacheWithRedirects, redirectedReference, key3, create) {
|
|
48007
48007
|
const cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
|
|
48008
|
-
let result = cache.get(
|
|
48008
|
+
let result = cache.get(key3);
|
|
48009
48009
|
if (!result) {
|
|
48010
48010
|
result = create();
|
|
48011
|
-
cache.set(
|
|
48011
|
+
cache.set(key3, result);
|
|
48012
48012
|
}
|
|
48013
48013
|
return result;
|
|
48014
48014
|
}
|
|
@@ -48059,8 +48059,8 @@ ${lanes.join("\n")}
|
|
|
48059
48059
|
return underlying.has(getUnderlyingCacheKey(specifier, mode));
|
|
48060
48060
|
},
|
|
48061
48061
|
forEach(cb) {
|
|
48062
|
-
return underlying.forEach((elem,
|
|
48063
|
-
const [specifier, mode] = memoizedReverseKeys.get(
|
|
48062
|
+
return underlying.forEach((elem, key3) => {
|
|
48063
|
+
const [specifier, mode] = memoizedReverseKeys.get(key3);
|
|
48064
48064
|
return cb(elem, specifier, mode);
|
|
48065
48065
|
});
|
|
48066
48066
|
},
|
|
@@ -48987,8 +48987,8 @@ ${lanes.join("\n")}
|
|
|
48987
48987
|
loadEntrypointsFromTargetExports(target);
|
|
48988
48988
|
}
|
|
48989
48989
|
} else if (typeof exports2 === "object" && exports2 !== null && allKeysStartWithDot(exports2)) {
|
|
48990
|
-
for (const
|
|
48991
|
-
loadEntrypointsFromTargetExports(exports2[
|
|
48990
|
+
for (const key3 in exports2) {
|
|
48991
|
+
loadEntrypointsFromTargetExports(exports2[key3]);
|
|
48992
48992
|
}
|
|
48993
48993
|
} else {
|
|
48994
48994
|
loadEntrypointsFromTargetExports(exports2);
|
|
@@ -49044,9 +49044,9 @@ ${lanes.join("\n")}
|
|
|
49044
49044
|
}
|
|
49045
49045
|
}
|
|
49046
49046
|
} else if (typeof target === "object" && target !== null) {
|
|
49047
|
-
return forEach(getOwnKeys(target), (
|
|
49048
|
-
if (
|
|
49049
|
-
loadEntrypointsFromTargetExports(target[
|
|
49047
|
+
return forEach(getOwnKeys(target), (key3) => {
|
|
49048
|
+
if (key3 === "default" || contains(state.conditions, key3) || isApplicableVersionedTypesKey(state.conditions, key3)) {
|
|
49049
|
+
loadEntrypointsFromTargetExports(target[key3]);
|
|
49050
49050
|
return true;
|
|
49051
49051
|
}
|
|
49052
49052
|
});
|
|
@@ -49101,20 +49101,20 @@ ${lanes.join("\n")}
|
|
|
49101
49101
|
const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);
|
|
49102
49102
|
const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf("node_modules") + "node_modules".length) + directorySeparator;
|
|
49103
49103
|
let result = "";
|
|
49104
|
-
for (const
|
|
49105
|
-
if (hasProperty(peerDependencies,
|
|
49104
|
+
for (const key3 in peerDependencies) {
|
|
49105
|
+
if (hasProperty(peerDependencies, key3)) {
|
|
49106
49106
|
const peerPackageJson = getPackageJsonInfo(
|
|
49107
|
-
nodeModules +
|
|
49107
|
+
nodeModules + key3,
|
|
49108
49108
|
/*onlyRecordFailures*/
|
|
49109
49109
|
false,
|
|
49110
49110
|
state
|
|
49111
49111
|
);
|
|
49112
49112
|
if (peerPackageJson) {
|
|
49113
49113
|
const version22 = peerPackageJson.contents.packageJsonContent.version;
|
|
49114
|
-
result += `+${
|
|
49115
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version,
|
|
49114
|
+
result += `+${key3}@${version22}`;
|
|
49115
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key3, version22);
|
|
49116
49116
|
} else {
|
|
49117
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0,
|
|
49117
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key3);
|
|
49118
49118
|
}
|
|
49119
49119
|
}
|
|
49120
49120
|
}
|
|
@@ -49454,7 +49454,7 @@ ${lanes.join("\n")}
|
|
|
49454
49454
|
}
|
|
49455
49455
|
function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
49456
49456
|
return loadModuleFromTargetExportOrImport;
|
|
49457
|
-
function loadModuleFromTargetExportOrImport(target, subpath, pattern,
|
|
49457
|
+
function loadModuleFromTargetExportOrImport(target, subpath, pattern, key3) {
|
|
49458
49458
|
var _a3, _b;
|
|
49459
49459
|
if (typeof target === "string") {
|
|
49460
49460
|
if (!pattern && subpath.length > 0 && !endsWith(target, "/")) {
|
|
@@ -49469,7 +49469,7 @@ ${lanes.join("\n")}
|
|
|
49469
49469
|
if (!startsWith(target, "./")) {
|
|
49470
49470
|
if (isImports && !startsWith(target, "../") && !startsWith(target, "/") && !isRootedDiskPath(target)) {
|
|
49471
49471
|
const combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
|
|
49472
|
-
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports",
|
|
49472
|
+
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key3, combinedLookup);
|
|
49473
49473
|
traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
|
|
49474
49474
|
const result = nodeModuleNameResolverWorker(
|
|
49475
49475
|
state.features,
|
|
@@ -49527,7 +49527,7 @@ ${lanes.join("\n")}
|
|
|
49527
49527
|
);
|
|
49528
49528
|
}
|
|
49529
49529
|
if (state.traceEnabled) {
|
|
49530
|
-
trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports",
|
|
49530
|
+
trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key3, pattern ? target.replace(/\*/g, subpath) : target + subpath);
|
|
49531
49531
|
}
|
|
49532
49532
|
const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
49533
49533
|
const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
@@ -49547,7 +49547,7 @@ ${lanes.join("\n")}
|
|
|
49547
49547
|
if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
|
|
49548
49548
|
traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
|
|
49549
49549
|
const subTarget = target[condition];
|
|
49550
|
-
const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern,
|
|
49550
|
+
const result = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key3);
|
|
49551
49551
|
if (result) {
|
|
49552
49552
|
if (result.value) {
|
|
49553
49553
|
traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
|
|
@@ -49574,7 +49574,7 @@ ${lanes.join("\n")}
|
|
|
49574
49574
|
);
|
|
49575
49575
|
}
|
|
49576
49576
|
for (const elem of target) {
|
|
49577
|
-
const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern,
|
|
49577
|
+
const result = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key3);
|
|
49578
49578
|
if (result) {
|
|
49579
49579
|
return result;
|
|
49580
49580
|
}
|
|
@@ -49686,10 +49686,10 @@ ${lanes.join("\n")}
|
|
|
49686
49686
|
}
|
|
49687
49687
|
}
|
|
49688
49688
|
}
|
|
49689
|
-
function isApplicableVersionedTypesKey(conditions,
|
|
49689
|
+
function isApplicableVersionedTypesKey(conditions, key3) {
|
|
49690
49690
|
if (!conditions.includes("types")) return false;
|
|
49691
|
-
if (!startsWith(
|
|
49692
|
-
const range = VersionRange.tryParse(
|
|
49691
|
+
if (!startsWith(key3, "types@")) return false;
|
|
49692
|
+
const range = VersionRange.tryParse(key3.substring("types@".length));
|
|
49693
49693
|
if (!range) return false;
|
|
49694
49694
|
return range.test(version2);
|
|
49695
49695
|
}
|
|
@@ -54130,8 +54130,8 @@ ${lanes.join("\n")}
|
|
|
54130
54130
|
}
|
|
54131
54131
|
}
|
|
54132
54132
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) {
|
|
54133
|
-
for (const
|
|
54134
|
-
for (const patternText2 of paths[
|
|
54133
|
+
for (const key3 in paths) {
|
|
54134
|
+
for (const patternText2 of paths[key3]) {
|
|
54135
54135
|
const normalized = normalizePath(patternText2);
|
|
54136
54136
|
const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized;
|
|
54137
54137
|
const indexOfStar = pattern.indexOf("*");
|
|
@@ -54149,12 +54149,12 @@ ${lanes.join("\n")}
|
|
|
54149
54149
|
if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
|
|
54150
54150
|
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
|
54151
54151
|
if (!pathIsRelative(matchedStar)) {
|
|
54152
|
-
return replaceFirstStar(
|
|
54152
|
+
return replaceFirstStar(key3, matchedStar);
|
|
54153
54153
|
}
|
|
54154
54154
|
}
|
|
54155
54155
|
}
|
|
54156
54156
|
} else if (some(candidates, (c) => c.ending !== 0 && pattern === c.value) || some(candidates, (c) => c.ending === 0 && pattern === c.value && validateEnding(c))) {
|
|
54157
|
-
return
|
|
54157
|
+
return key3;
|
|
54158
54158
|
}
|
|
54159
54159
|
}
|
|
54160
54160
|
}
|
|
@@ -54271,9 +54271,9 @@ ${lanes.join("\n")}
|
|
|
54271
54271
|
} else if (Array.isArray(exports2)) {
|
|
54272
54272
|
return forEach(exports2, (e) => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports, preferTsExtension));
|
|
54273
54273
|
} else if (typeof exports2 === "object" && exports2 !== null) {
|
|
54274
|
-
for (const
|
|
54275
|
-
if (
|
|
54276
|
-
const subTarget = exports2[
|
|
54274
|
+
for (const key3 of getOwnKeys(exports2)) {
|
|
54275
|
+
if (key3 === "default" || conditions.indexOf(key3) >= 0 || isApplicableVersionedTypesKey(conditions, key3)) {
|
|
54276
|
+
const subTarget = exports2[key3];
|
|
54277
54277
|
const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports, preferTsExtension);
|
|
54278
54278
|
if (result) {
|
|
54279
54279
|
return result;
|
|
@@ -55898,11 +55898,11 @@ ${lanes.join("\n")}
|
|
|
55898
55898
|
if (!isIdentifier(node.expression.expression)) return false;
|
|
55899
55899
|
return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;
|
|
55900
55900
|
}
|
|
55901
|
-
function getCachedType(
|
|
55902
|
-
return
|
|
55901
|
+
function getCachedType(key3) {
|
|
55902
|
+
return key3 ? cachedTypes.get(key3) : void 0;
|
|
55903
55903
|
}
|
|
55904
|
-
function setCachedType(
|
|
55905
|
-
if (
|
|
55904
|
+
function setCachedType(key3, type) {
|
|
55905
|
+
if (key3) cachedTypes.set(key3, type);
|
|
55906
55906
|
return type;
|
|
55907
55907
|
}
|
|
55908
55908
|
function getJsxNamespace(location) {
|
|
@@ -55989,9 +55989,9 @@ ${lanes.join("\n")}
|
|
|
55989
55989
|
return diagnostic;
|
|
55990
55990
|
}
|
|
55991
55991
|
}
|
|
55992
|
-
function errorSkippedOn(
|
|
55992
|
+
function errorSkippedOn(key3, location, message, ...args) {
|
|
55993
55993
|
const diagnostic = error210(location, message, ...args);
|
|
55994
|
-
diagnostic.skippedOn =
|
|
55994
|
+
diagnostic.skippedOn = key3;
|
|
55995
55995
|
return diagnostic;
|
|
55996
55996
|
}
|
|
55997
55997
|
function createError(location, message, ...args) {
|
|
@@ -56302,9 +56302,9 @@ ${lanes.join("\n")}
|
|
|
56302
56302
|
"resolvedExports"
|
|
56303
56303
|
/* resolvedExports */
|
|
56304
56304
|
);
|
|
56305
|
-
for (const [
|
|
56306
|
-
if (resolvedExports.has(
|
|
56307
|
-
mergeSymbol(resolvedExports.get(
|
|
56305
|
+
for (const [key3, value] of arrayFrom(moduleAugmentation.symbol.exports.entries())) {
|
|
56306
|
+
if (resolvedExports.has(key3) && !mainModule.exports.has(key3)) {
|
|
56307
|
+
mergeSymbol(resolvedExports.get(key3), value);
|
|
56308
56308
|
}
|
|
56309
56309
|
}
|
|
56310
56310
|
}
|
|
@@ -58320,9 +58320,9 @@ ${lanes.join("\n")}
|
|
|
58320
58320
|
}
|
|
58321
58321
|
function forEachExportAndPropertyOfModule(moduleSymbol, cb) {
|
|
58322
58322
|
const exports2 = getExportsOfModule(moduleSymbol);
|
|
58323
|
-
exports2.forEach((symbol2,
|
|
58324
|
-
if (!isReservedMemberName(
|
|
58325
|
-
cb(symbol2,
|
|
58323
|
+
exports2.forEach((symbol2, key3) => {
|
|
58324
|
+
if (!isReservedMemberName(key3)) {
|
|
58325
|
+
cb(symbol2, key3);
|
|
58326
58326
|
}
|
|
58327
58327
|
});
|
|
58328
58328
|
const exportEquals = resolveExternalModuleSymbol(moduleSymbol);
|
|
@@ -58656,11 +58656,11 @@ ${lanes.join("\n")}
|
|
|
58656
58656
|
return type;
|
|
58657
58657
|
}
|
|
58658
58658
|
function checkIntrinsicName(name, debug) {
|
|
58659
|
-
const
|
|
58660
|
-
if (seenIntrinsicNames.has(
|
|
58659
|
+
const key3 = `${name},${debug ?? ""}`;
|
|
58660
|
+
if (seenIntrinsicNames.has(key3)) {
|
|
58661
58661
|
Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
|
|
58662
58662
|
}
|
|
58663
|
-
seenIntrinsicNames.add(
|
|
58663
|
+
seenIntrinsicNames.add(key3);
|
|
58664
58664
|
}
|
|
58665
58665
|
function createObjectType(objectFlags, symbol2) {
|
|
58666
58666
|
const type = createTypeWithSymbol(1048576, symbol2);
|
|
@@ -58801,9 +58801,9 @@ ${lanes.join("\n")}
|
|
|
58801
58801
|
case 232:
|
|
58802
58802
|
case 265:
|
|
58803
58803
|
let table;
|
|
58804
|
-
(getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol,
|
|
58804
|
+
(getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key3) => {
|
|
58805
58805
|
if (memberSymbol.flags & (788968 & ~67108864)) {
|
|
58806
|
-
(table || (table = createSymbolTable())).set(
|
|
58806
|
+
(table || (table = createSymbolTable())).set(key3, memberSymbol);
|
|
58807
58807
|
}
|
|
58808
58808
|
});
|
|
58809
58809
|
if (table && (result = callback(
|
|
@@ -58837,9 +58837,9 @@ ${lanes.join("\n")}
|
|
|
58837
58837
|
const links = getSymbolLinks(symbol2);
|
|
58838
58838
|
const cache = links.accessibleChainCache || (links.accessibleChainCache = /* @__PURE__ */ new Map());
|
|
58839
58839
|
const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);
|
|
58840
|
-
const
|
|
58841
|
-
if (cache.has(
|
|
58842
|
-
return cache.get(
|
|
58840
|
+
const key3 = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;
|
|
58841
|
+
if (cache.has(key3)) {
|
|
58842
|
+
return cache.get(key3);
|
|
58843
58843
|
}
|
|
58844
58844
|
const id = getSymbolId(symbol2);
|
|
58845
58845
|
let visitedSymbolTables = visitedSymbolTablesMap.get(id);
|
|
@@ -58847,7 +58847,7 @@ ${lanes.join("\n")}
|
|
|
58847
58847
|
visitedSymbolTablesMap.set(id, visitedSymbolTables = []);
|
|
58848
58848
|
}
|
|
58849
58849
|
const result = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
|
|
58850
|
-
cache.set(
|
|
58850
|
+
cache.set(key3, result);
|
|
58851
58851
|
return result;
|
|
58852
58852
|
function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification, isLocalNameLookup) {
|
|
58853
58853
|
if (!pushIfUnique(visitedSymbolTables, symbols)) {
|
|
@@ -60508,11 +60508,11 @@ ${lanes.join("\n")}
|
|
|
60508
60508
|
context.symbolDepth = /* @__PURE__ */ new Map();
|
|
60509
60509
|
}
|
|
60510
60510
|
const links = context.maxExpansionDepth >= 0 ? void 0 : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
60511
|
-
const
|
|
60511
|
+
const key3 = `${getTypeId(type2)}|${context.flags}|${context.internalFlags}`;
|
|
60512
60512
|
if (links) {
|
|
60513
60513
|
links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map());
|
|
60514
60514
|
}
|
|
60515
|
-
const cachedResult = (_a22 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a22.get(
|
|
60515
|
+
const cachedResult = (_a22 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a22.get(key3);
|
|
60516
60516
|
if (cachedResult) {
|
|
60517
60517
|
(_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach(
|
|
60518
60518
|
([symbol2, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
@@ -60542,7 +60542,7 @@ ${lanes.join("\n")}
|
|
|
60542
60542
|
const result = transform22(type2);
|
|
60543
60543
|
const addedLength = context.approximateLength - startLength;
|
|
60544
60544
|
if (!context.reportedDiagnostic && !context.encounteredError) {
|
|
60545
|
-
(_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(
|
|
60545
|
+
(_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key3, {
|
|
60546
60546
|
node: result,
|
|
60547
60547
|
truncating: context.truncating,
|
|
60548
60548
|
addedLength,
|
|
@@ -67125,8 +67125,8 @@ ${lanes.join("\n")}
|
|
|
67125
67125
|
if (!signature.optionalCallSignatureCache) {
|
|
67126
67126
|
signature.optionalCallSignatureCache = {};
|
|
67127
67127
|
}
|
|
67128
|
-
const
|
|
67129
|
-
return signature.optionalCallSignatureCache[
|
|
67128
|
+
const key3 = callChainFlags === 8 ? "inner" : "outer";
|
|
67129
|
+
return signature.optionalCallSignatureCache[key3] || (signature.optionalCallSignatureCache[key3] = createOptionalCallSignature(signature, callChainFlags));
|
|
67130
67130
|
}
|
|
67131
67131
|
function createOptionalCallSignature(signature, callChainFlags) {
|
|
67132
67132
|
Debug.assert(callChainFlags === 8 || callChainFlags === 16, "An optional call signature can either be for an inner call chain or an outer call chain, but not both.");
|
|
@@ -68342,8 +68342,8 @@ ${lanes.join("\n")}
|
|
|
68342
68342
|
true
|
|
68343
68343
|
));
|
|
68344
68344
|
}
|
|
68345
|
-
const
|
|
68346
|
-
return getCachedType(
|
|
68345
|
+
const key3 = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
68346
|
+
return getCachedType(key3) ?? setCachedType(key3, getTypeWithThisArgument(
|
|
68347
68347
|
type,
|
|
68348
68348
|
thisArgument,
|
|
68349
68349
|
/*needApparentType*/
|
|
@@ -70555,10 +70555,10 @@ ${lanes.join("\n")}
|
|
|
70555
70555
|
if (elementFlags.length === 1 && elementFlags[0] & 4) {
|
|
70556
70556
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
70557
70557
|
}
|
|
70558
|
-
const
|
|
70559
|
-
let type = tupleTypes.get(
|
|
70558
|
+
const key3 = map2(elementFlags, (f) => f & 1 ? "#" : f & 2 ? "?" : f & 4 ? "." : "*").join() + (readonly2 ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map2(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
70559
|
+
let type = tupleTypes.get(key3);
|
|
70560
70560
|
if (!type) {
|
|
70561
|
-
tupleTypes.set(
|
|
70561
|
+
tupleTypes.set(key3, type = createTupleTargetType(elementFlags, readonly2, namedMemberDeclarations));
|
|
70562
70562
|
}
|
|
70563
70563
|
return type;
|
|
70564
70564
|
}
|
|
@@ -72600,14 +72600,14 @@ ${lanes.join("\n")}
|
|
|
72600
72600
|
}
|
|
72601
72601
|
function getBigIntLiteralType(value) {
|
|
72602
72602
|
let type;
|
|
72603
|
-
const
|
|
72604
|
-
return bigIntLiteralTypes.get(
|
|
72603
|
+
const key3 = pseudoBigIntToString(value);
|
|
72604
|
+
return bigIntLiteralTypes.get(key3) || (bigIntLiteralTypes.set(key3, type = createLiteralType(4096, value)), type);
|
|
72605
72605
|
}
|
|
72606
72606
|
function getEnumLiteralType(value, enumId, symbol2) {
|
|
72607
72607
|
let type;
|
|
72608
|
-
const
|
|
72608
|
+
const key3 = `${enumId}${typeof value === "string" ? "@" : "#"}${value}`;
|
|
72609
72609
|
const flags = 32768 | (typeof value === "string" ? 1024 : 2048);
|
|
72610
|
-
return enumLiteralTypes.get(
|
|
72610
|
+
return enumLiteralTypes.get(key3) || (enumLiteralTypes.set(key3, type = createLiteralType(flags, value, symbol2)), type);
|
|
72611
72611
|
}
|
|
72612
72612
|
function getTypeFromLiteralTypeNode(node) {
|
|
72613
72613
|
if (node.literal.kind === 106) {
|
|
@@ -73139,8 +73139,8 @@ ${lanes.join("\n")}
|
|
|
73139
73139
|
);
|
|
73140
73140
|
return isErrorType(elementType) ? errorType : createArrayType(elementType, getModifiedReadonlyState(isReadonlyArrayType(arrayType), getMappedTypeModifiers(mappedType)));
|
|
73141
73141
|
}
|
|
73142
|
-
function instantiateMappedTypeTemplate(type,
|
|
73143
|
-
const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type),
|
|
73142
|
+
function instantiateMappedTypeTemplate(type, key3, isOptional, mapper) {
|
|
73143
|
+
const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type), key3);
|
|
73144
73144
|
const propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper);
|
|
73145
73145
|
const modifiers = getMappedTypeModifiers(type);
|
|
73146
73146
|
return strictNullChecks && modifiers & 4 && !maybeTypeOfKind(
|
|
@@ -73219,9 +73219,9 @@ ${lanes.join("\n")}
|
|
|
73219
73219
|
if (index === -1) {
|
|
73220
73220
|
pushActiveMapper(mapper);
|
|
73221
73221
|
}
|
|
73222
|
-
const
|
|
73222
|
+
const key3 = type.id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
73223
73223
|
const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1];
|
|
73224
|
-
const cached2 = mapperCache.get(
|
|
73224
|
+
const cached2 = mapperCache.get(key3);
|
|
73225
73225
|
if (cached2) {
|
|
73226
73226
|
return cached2;
|
|
73227
73227
|
}
|
|
@@ -73232,7 +73232,7 @@ ${lanes.join("\n")}
|
|
|
73232
73232
|
if (index === -1) {
|
|
73233
73233
|
popActiveMapper();
|
|
73234
73234
|
} else {
|
|
73235
|
-
mapperCache.set(
|
|
73235
|
+
mapperCache.set(key3, result);
|
|
73236
73236
|
}
|
|
73237
73237
|
instantiationDepth--;
|
|
73238
73238
|
return result;
|
|
@@ -77488,8 +77488,8 @@ ${lanes.join("\n")}
|
|
|
77488
77488
|
return type.flags & 98304 ? getBaseTypeOfEnumLikeType(type) : type.flags & (1024 | 4194304 | 8388608) ? stringType : type.flags & 2048 ? numberType : type.flags & 4096 ? bigintType : type.flags & 8192 ? booleanType : type.flags & 134217728 ? getBaseTypeOfLiteralTypeUnion(type) : type;
|
|
77489
77489
|
}
|
|
77490
77490
|
function getBaseTypeOfLiteralTypeUnion(type) {
|
|
77491
|
-
const
|
|
77492
|
-
return getCachedType(
|
|
77491
|
+
const key3 = `B${getTypeId(type)}`;
|
|
77492
|
+
return getCachedType(key3) ?? setCachedType(key3, mapType(type, getBaseTypeOfLiteralType));
|
|
77493
77493
|
}
|
|
77494
77494
|
function getBaseTypeOfLiteralTypeForComparison(type) {
|
|
77495
77495
|
return type.flags & (1024 | 4194304 | 8388608) ? stringType : type.flags & (2048 | 65536) ? numberType : type.flags & 4096 ? bigintType : type.flags & 8192 ? booleanType : type.flags & 134217728 ? mapType(type, getBaseTypeOfLiteralTypeForComparison) : type;
|
|
@@ -78619,14 +78619,14 @@ ${lanes.join("\n")}
|
|
|
78619
78619
|
priority = savePriority;
|
|
78620
78620
|
}
|
|
78621
78621
|
function invokeOnce(source, target, action) {
|
|
78622
|
-
const
|
|
78623
|
-
const status = visited && visited.get(
|
|
78622
|
+
const key3 = source.id + "," + target.id;
|
|
78623
|
+
const status = visited && visited.get(key3);
|
|
78624
78624
|
if (status !== void 0) {
|
|
78625
78625
|
inferencePriority = Math.min(inferencePriority, status);
|
|
78626
78626
|
return;
|
|
78627
78627
|
}
|
|
78628
78628
|
(visited || (visited = /* @__PURE__ */ new Map())).set(
|
|
78629
|
-
|
|
78629
|
+
key3,
|
|
78630
78630
|
-1
|
|
78631
78631
|
/* Circularity */
|
|
78632
78632
|
);
|
|
@@ -78645,7 +78645,7 @@ ${lanes.join("\n")}
|
|
|
78645
78645
|
targetStack.pop();
|
|
78646
78646
|
sourceStack.pop();
|
|
78647
78647
|
expandingFlags = saveExpandingFlags;
|
|
78648
|
-
visited.set(
|
|
78648
|
+
visited.set(key3, inferencePriority);
|
|
78649
78649
|
inferencePriority = Math.min(inferencePriority, saveInferencePriority);
|
|
78650
78650
|
}
|
|
78651
78651
|
function inferFromMatchingTypes(sources, targets, matches) {
|
|
@@ -79271,14 +79271,14 @@ ${lanes.join("\n")}
|
|
|
79271
79271
|
case 213:
|
|
79272
79272
|
const propName = getAccessedPropertyName(node);
|
|
79273
79273
|
if (propName !== void 0) {
|
|
79274
|
-
const
|
|
79275
|
-
return
|
|
79274
|
+
const key3 = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
79275
|
+
return key3 && `${key3}.${propName}`;
|
|
79276
79276
|
}
|
|
79277
79277
|
if (isElementAccessExpression(node) && isIdentifier(node.argumentExpression)) {
|
|
79278
79278
|
const symbol2 = getResolvedSymbol(node.argumentExpression);
|
|
79279
79279
|
if (isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2)) {
|
|
79280
|
-
const
|
|
79281
|
-
return
|
|
79280
|
+
const key3 = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
79281
|
+
return key3 && `${key3}.@${getSymbolId(symbol2)}`;
|
|
79282
79282
|
}
|
|
79283
79283
|
}
|
|
79284
79284
|
break;
|
|
@@ -79526,8 +79526,8 @@ ${lanes.join("\n")}
|
|
|
79526
79526
|
if (assignedType.flags & 262144) {
|
|
79527
79527
|
return assignedType;
|
|
79528
79528
|
}
|
|
79529
|
-
const
|
|
79530
|
-
return getCachedType(
|
|
79529
|
+
const key3 = `A${getTypeId(declaredType)},${getTypeId(assignedType)}`;
|
|
79530
|
+
return getCachedType(key3) ?? setCachedType(key3, getAssignmentReducedTypeWorker(declaredType, assignedType));
|
|
79531
79531
|
}
|
|
79532
79532
|
function getAssignmentReducedTypeWorker(declaredType, assignedType) {
|
|
79533
79533
|
const filteredType = filterType(declaredType, (t) => typeMaybeAssignableTo(assignedType, t));
|
|
@@ -80303,7 +80303,7 @@ ${lanes.join("\n")}
|
|
|
80303
80303
|
return false;
|
|
80304
80304
|
}
|
|
80305
80305
|
function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a3) => (_a3 = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a3.flowNode)()) {
|
|
80306
|
-
let
|
|
80306
|
+
let key3;
|
|
80307
80307
|
let isKeySet = false;
|
|
80308
80308
|
let flowDepth = 0;
|
|
80309
80309
|
if (flowAnalysisDisabled) {
|
|
@@ -80327,10 +80327,10 @@ ${lanes.join("\n")}
|
|
|
80327
80327
|
return resultType;
|
|
80328
80328
|
function getOrSetCacheKey() {
|
|
80329
80329
|
if (isKeySet) {
|
|
80330
|
-
return
|
|
80330
|
+
return key3;
|
|
80331
80331
|
}
|
|
80332
80332
|
isKeySet = true;
|
|
80333
|
-
return
|
|
80333
|
+
return key3 = getFlowCacheKey(reference, declaredType, initialType, flowContainer);
|
|
80334
80334
|
}
|
|
80335
80335
|
function getTypeAtFlowNode(flow) {
|
|
80336
80336
|
var _a22;
|
|
@@ -83507,9 +83507,9 @@ ${lanes.join("\n")}
|
|
|
83507
83507
|
return false;
|
|
83508
83508
|
}
|
|
83509
83509
|
function discriminateContextualTypeByObjectMembers(node, contextualType) {
|
|
83510
|
-
const
|
|
83511
|
-
return getCachedType(
|
|
83512
|
-
|
|
83510
|
+
const key3 = `D${getNodeId(node)},${getTypeId(contextualType)}`;
|
|
83511
|
+
return getCachedType(key3) ?? setCachedType(
|
|
83512
|
+
key3,
|
|
83513
83513
|
getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(
|
|
83514
83514
|
contextualType,
|
|
83515
83515
|
concatenate(
|
|
@@ -83541,12 +83541,12 @@ ${lanes.join("\n")}
|
|
|
83541
83541
|
);
|
|
83542
83542
|
}
|
|
83543
83543
|
function discriminateContextualTypeByJSXAttributes(node, contextualType) {
|
|
83544
|
-
const
|
|
83545
|
-
const cached2 = getCachedType(
|
|
83544
|
+
const key3 = `D${getNodeId(node)},${getTypeId(contextualType)}`;
|
|
83545
|
+
const cached2 = getCachedType(key3);
|
|
83546
83546
|
if (cached2) return cached2;
|
|
83547
83547
|
const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
|
|
83548
83548
|
return setCachedType(
|
|
83549
|
-
|
|
83549
|
+
key3,
|
|
83550
83550
|
discriminateTypeByDiscriminableItems(
|
|
83551
83551
|
contextualType,
|
|
83552
83552
|
concatenate(
|
|
@@ -85712,11 +85712,11 @@ ${lanes.join("\n")}
|
|
|
85712
85712
|
function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
|
|
85713
85713
|
const links = getNodeLinks(propNode);
|
|
85714
85714
|
const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set());
|
|
85715
|
-
const
|
|
85716
|
-
if (cache.has(
|
|
85715
|
+
const key3 = `${getTypeId(containingType)}|${isUncheckedJS}`;
|
|
85716
|
+
if (cache.has(key3)) {
|
|
85717
85717
|
return;
|
|
85718
85718
|
}
|
|
85719
|
-
cache.add(
|
|
85719
|
+
cache.add(key3);
|
|
85720
85720
|
let errorInfo;
|
|
85721
85721
|
let relatedInfo;
|
|
85722
85722
|
if (!isPrivateIdentifier(propNode) && containingType.flags & 134217728 && !(containingType.flags & 12713980)) {
|
|
@@ -89066,8 +89066,8 @@ ${lanes.join("\n")}
|
|
|
89066
89066
|
), [thisType, valueType]);
|
|
89067
89067
|
}
|
|
89068
89068
|
function getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2) {
|
|
89069
|
-
const
|
|
89070
|
-
let overrideType = decoratorContextOverrideTypeCache.get(
|
|
89069
|
+
const key3 = `${isPrivate ? "p" : "P"}${isStatic2 ? "s" : "S"}${nameType.id}`;
|
|
89070
|
+
let overrideType = decoratorContextOverrideTypeCache.get(key3);
|
|
89071
89071
|
if (!overrideType) {
|
|
89072
89072
|
const members = createSymbolTable();
|
|
89073
89073
|
members.set("name", createProperty("name", nameType));
|
|
@@ -89081,7 +89081,7 @@ ${lanes.join("\n")}
|
|
|
89081
89081
|
emptyArray,
|
|
89082
89082
|
emptyArray
|
|
89083
89083
|
);
|
|
89084
|
-
decoratorContextOverrideTypeCache.set(
|
|
89084
|
+
decoratorContextOverrideTypeCache.set(key3, overrideType);
|
|
89085
89085
|
}
|
|
89086
89086
|
return overrideType;
|
|
89087
89087
|
}
|
|
@@ -94125,13 +94125,13 @@ ${lanes.join("\n")}
|
|
|
94125
94125
|
function isTypeParameterUnused(typeParameter) {
|
|
94126
94126
|
return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144) && !isIdentifierThatStartsWithUnderscore(typeParameter.name);
|
|
94127
94127
|
}
|
|
94128
|
-
function addToGroup(map22,
|
|
94129
|
-
const keyString = String(getKey(
|
|
94128
|
+
function addToGroup(map22, key3, value, getKey) {
|
|
94129
|
+
const keyString = String(getKey(key3));
|
|
94130
94130
|
const group2 = map22.get(keyString);
|
|
94131
94131
|
if (group2) {
|
|
94132
94132
|
group2[1].push(value);
|
|
94133
94133
|
} else {
|
|
94134
|
-
map22.set(keyString, [
|
|
94134
|
+
map22.set(keyString, [key3, [value]]);
|
|
94135
94135
|
}
|
|
94136
94136
|
}
|
|
94137
94137
|
function tryGetRootParameterDeclaration(node) {
|
|
@@ -101694,10 +101694,10 @@ ${lanes.join("\n")}
|
|
|
101694
101694
|
}
|
|
101695
101695
|
return false;
|
|
101696
101696
|
}
|
|
101697
|
-
function grammarErrorOnNodeSkippedOn(
|
|
101697
|
+
function grammarErrorOnNodeSkippedOn(key3, node, message, ...args) {
|
|
101698
101698
|
const sourceFile = getSourceFileOfNode(node);
|
|
101699
101699
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
101700
|
-
errorSkippedOn(
|
|
101700
|
+
errorSkippedOn(key3, node, message, ...args);
|
|
101701
101701
|
return true;
|
|
101702
101702
|
}
|
|
101703
101703
|
return false;
|
|
@@ -105016,12 +105016,12 @@ ${lanes.join("\n")}
|
|
|
105016
105016
|
}
|
|
105017
105017
|
return exportedNames;
|
|
105018
105018
|
}
|
|
105019
|
-
function multiMapSparseArrayAdd(map22,
|
|
105020
|
-
let values = map22[
|
|
105019
|
+
function multiMapSparseArrayAdd(map22, key3, value) {
|
|
105020
|
+
let values = map22[key3];
|
|
105021
105021
|
if (values) {
|
|
105022
105022
|
values.push(value);
|
|
105023
105023
|
} else {
|
|
105024
|
-
map22[
|
|
105024
|
+
map22[key3] = values = [value];
|
|
105025
105025
|
}
|
|
105026
105026
|
return values;
|
|
105027
105027
|
}
|
|
@@ -105032,19 +105032,19 @@ ${lanes.join("\n")}
|
|
|
105032
105032
|
get size() {
|
|
105033
105033
|
return this._map.size;
|
|
105034
105034
|
}
|
|
105035
|
-
has(
|
|
105036
|
-
return this._map.has(_IdentifierNameMap.toKey(
|
|
105035
|
+
has(key3) {
|
|
105036
|
+
return this._map.has(_IdentifierNameMap.toKey(key3));
|
|
105037
105037
|
}
|
|
105038
|
-
get(
|
|
105039
|
-
return this._map.get(_IdentifierNameMap.toKey(
|
|
105038
|
+
get(key3) {
|
|
105039
|
+
return this._map.get(_IdentifierNameMap.toKey(key3));
|
|
105040
105040
|
}
|
|
105041
|
-
set(
|
|
105042
|
-
this._map.set(_IdentifierNameMap.toKey(
|
|
105041
|
+
set(key3, value) {
|
|
105042
|
+
this._map.set(_IdentifierNameMap.toKey(key3), value);
|
|
105043
105043
|
return this;
|
|
105044
105044
|
}
|
|
105045
|
-
delete(
|
|
105045
|
+
delete(key3) {
|
|
105046
105046
|
var _a3;
|
|
105047
|
-
return ((_a3 = this._map) == null ? void 0 : _a3.delete(_IdentifierNameMap.toKey(
|
|
105047
|
+
return ((_a3 = this._map) == null ? void 0 : _a3.delete(_IdentifierNameMap.toKey(key3))) ?? false;
|
|
105048
105048
|
}
|
|
105049
105049
|
clear() {
|
|
105050
105050
|
this._map.clear();
|
|
@@ -105085,21 +105085,21 @@ ${lanes.join("\n")}
|
|
|
105085
105085
|
}
|
|
105086
105086
|
};
|
|
105087
105087
|
var IdentifierNameMultiMap = class extends IdentifierNameMap {
|
|
105088
|
-
add(
|
|
105089
|
-
let values = this.get(
|
|
105088
|
+
add(key3, value) {
|
|
105089
|
+
let values = this.get(key3);
|
|
105090
105090
|
if (values) {
|
|
105091
105091
|
values.push(value);
|
|
105092
105092
|
} else {
|
|
105093
|
-
this.set(
|
|
105093
|
+
this.set(key3, values = [value]);
|
|
105094
105094
|
}
|
|
105095
105095
|
return values;
|
|
105096
105096
|
}
|
|
105097
|
-
remove(
|
|
105098
|
-
const values = this.get(
|
|
105097
|
+
remove(key3, value) {
|
|
105098
|
+
const values = this.get(key3);
|
|
105099
105099
|
if (values) {
|
|
105100
105100
|
unorderedRemoveItem(values, value);
|
|
105101
105101
|
if (!values.length) {
|
|
105102
|
-
this.delete(
|
|
105102
|
+
this.delete(key3);
|
|
105103
105103
|
}
|
|
105104
105104
|
}
|
|
105105
105105
|
}
|
|
@@ -105864,8 +105864,8 @@ ${lanes.join("\n")}
|
|
|
105864
105864
|
}
|
|
105865
105865
|
const assignedName = factory2.getGeneratedNameForNode(name);
|
|
105866
105866
|
context.hoistVariableDeclaration(assignedName);
|
|
105867
|
-
const
|
|
105868
|
-
const assignment = factory2.createAssignment(assignedName,
|
|
105867
|
+
const key3 = context.getEmitHelperFactory().createPropKeyHelper(name.expression);
|
|
105868
|
+
const assignment = factory2.createAssignment(assignedName, key3);
|
|
105869
105869
|
const updatedName = factory2.updateComputedPropertyName(name, assignment);
|
|
105870
105870
|
return { assignedName, name: updatedName };
|
|
105871
105871
|
}
|
|
@@ -112840,8 +112840,8 @@ ${lanes.join("\n")}
|
|
|
112840
112840
|
}
|
|
112841
112841
|
const referencedName = factory2.getGeneratedNameForNode(node);
|
|
112842
112842
|
hoistVariableDeclaration(referencedName);
|
|
112843
|
-
const
|
|
112844
|
-
const assignment = factory2.createAssignment(referencedName,
|
|
112843
|
+
const key3 = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression));
|
|
112844
|
+
const assignment = factory2.createAssignment(referencedName, key3);
|
|
112845
112845
|
const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment));
|
|
112846
112846
|
return { referencedName, name };
|
|
112847
112847
|
}
|
|
@@ -114175,8 +114175,8 @@ ${lanes.join("\n")}
|
|
|
114175
114175
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
114176
114176
|
);
|
|
114177
114177
|
const accessors = [];
|
|
114178
|
-
names.forEach((_,
|
|
114179
|
-
const name = unescapeLeadingUnderscores(
|
|
114178
|
+
names.forEach((_, key3) => {
|
|
114179
|
+
const name = unescapeLeadingUnderscores(key3);
|
|
114180
114180
|
const getterAndSetter = [];
|
|
114181
114181
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
114182
114182
|
"get",
|
|
@@ -122198,7 +122198,7 @@ ${lanes.join("\n")}
|
|
|
122198
122198
|
if (containsYield(node)) {
|
|
122199
122199
|
const obj = declareLocal();
|
|
122200
122200
|
const keysArray = declareLocal();
|
|
122201
|
-
const
|
|
122201
|
+
const key3 = declareLocal();
|
|
122202
122202
|
const keysIndex = factory2.createLoopVariable();
|
|
122203
122203
|
const initializer3 = node.initializer;
|
|
122204
122204
|
hoistVariableDeclaration(keysIndex);
|
|
@@ -122206,14 +122206,14 @@ ${lanes.join("\n")}
|
|
|
122206
122206
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
122207
122207
|
emitStatement(
|
|
122208
122208
|
factory2.createForInStatement(
|
|
122209
|
-
|
|
122209
|
+
key3,
|
|
122210
122210
|
obj,
|
|
122211
122211
|
factory2.createExpressionStatement(
|
|
122212
122212
|
factory2.createCallExpression(
|
|
122213
122213
|
factory2.createPropertyAccessExpression(keysArray, "push"),
|
|
122214
122214
|
/*typeArguments*/
|
|
122215
122215
|
void 0,
|
|
122216
|
-
[
|
|
122216
|
+
[key3]
|
|
122217
122217
|
)
|
|
122218
122218
|
)
|
|
122219
122219
|
)
|
|
@@ -122224,8 +122224,8 @@ ${lanes.join("\n")}
|
|
|
122224
122224
|
const endLoopLabel = beginLoopBlock(incrementLabel);
|
|
122225
122225
|
markLabel(conditionLabel);
|
|
122226
122226
|
emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length")));
|
|
122227
|
-
emitAssignment(
|
|
122228
|
-
emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(
|
|
122227
|
+
emitAssignment(key3, factory2.createElementAccessExpression(keysArray, keysIndex));
|
|
122228
|
+
emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key3, 103, obj));
|
|
122229
122229
|
let variable;
|
|
122230
122230
|
if (isVariableDeclarationList(initializer3)) {
|
|
122231
122231
|
for (const variable2 of initializer3.declarations) {
|
|
@@ -122236,7 +122236,7 @@ ${lanes.join("\n")}
|
|
|
122236
122236
|
variable = Debug.checkDefined(visitNode(initializer3, visitor, isExpression));
|
|
122237
122237
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
122238
122238
|
}
|
|
122239
|
-
emitAssignment(variable,
|
|
122239
|
+
emitAssignment(variable, key3);
|
|
122240
122240
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
122241
122241
|
markLabel(incrementLabel);
|
|
122242
122242
|
emitStatement(factory2.createExpressionStatement(factory2.createPostfixIncrement(keysIndex)));
|
|
@@ -128492,10 +128492,10 @@ ${lanes.join("\n")}
|
|
|
128492
128492
|
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
128493
128493
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
128494
128494
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
128495
|
-
const
|
|
128496
|
-
if (lateStatementReplacementMap.has(
|
|
128497
|
-
const result = lateStatementReplacementMap.get(
|
|
128498
|
-
lateStatementReplacementMap.delete(
|
|
128495
|
+
const key3 = getOriginalNodeId(statement);
|
|
128496
|
+
if (lateStatementReplacementMap.has(key3)) {
|
|
128497
|
+
const result = lateStatementReplacementMap.get(key3);
|
|
128498
|
+
lateStatementReplacementMap.delete(key3);
|
|
128499
128499
|
if (result) {
|
|
128500
128500
|
if (isArray(result) ? some(result, needsScopeMarker) : needsScopeMarker(result)) {
|
|
128501
128501
|
needsScopeFixMarker = true;
|
|
@@ -134619,8 +134619,8 @@ ${lanes.join("\n")}
|
|
|
134619
134619
|
if (prefix.length > 0 && prefix.charCodeAt(0) === 35) {
|
|
134620
134620
|
prefix = prefix.slice(1);
|
|
134621
134621
|
}
|
|
134622
|
-
const
|
|
134623
|
-
let tempFlags2 = getTempFlags(
|
|
134622
|
+
const key3 = formatGeneratedName(privateName, prefix, "", suffix);
|
|
134623
|
+
let tempFlags2 = getTempFlags(key3);
|
|
134624
134624
|
if (flags && !(tempFlags2 & flags)) {
|
|
134625
134625
|
const name = flags === 268435456 ? "_i" : "_n";
|
|
134626
134626
|
const fullName = formatGeneratedName(privateName, prefix, name, suffix);
|
|
@@ -134631,7 +134631,7 @@ ${lanes.join("\n")}
|
|
|
134631
134631
|
} else if (reservedInNestedScopes) {
|
|
134632
134632
|
reserveNameInNestedScopes(fullName);
|
|
134633
134633
|
}
|
|
134634
|
-
setTempFlags(
|
|
134634
|
+
setTempFlags(key3, tempFlags2);
|
|
134635
134635
|
return fullName;
|
|
134636
134636
|
}
|
|
134637
134637
|
}
|
|
@@ -134647,7 +134647,7 @@ ${lanes.join("\n")}
|
|
|
134647
134647
|
} else if (reservedInNestedScopes) {
|
|
134648
134648
|
reserveNameInNestedScopes(fullName);
|
|
134649
134649
|
}
|
|
134650
|
-
setTempFlags(
|
|
134650
|
+
setTempFlags(key3, tempFlags2);
|
|
134651
134651
|
return fullName;
|
|
134652
134652
|
}
|
|
134653
134653
|
}
|
|
@@ -135610,10 +135610,10 @@ ${lanes.join("\n")}
|
|
|
135610
135610
|
}
|
|
135611
135611
|
function cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3) {
|
|
135612
135612
|
if (!extendedConfigCache.delete(extendedConfigFilePath)) return;
|
|
135613
|
-
extendedConfigCache.forEach(({ extendedResult },
|
|
135613
|
+
extendedConfigCache.forEach(({ extendedResult }, key3) => {
|
|
135614
135614
|
var _a3;
|
|
135615
135615
|
if ((_a3 = extendedResult.extendedSourceFiles) == null ? void 0 : _a3.some((extendedFile) => toPath3(extendedFile) === extendedConfigFilePath)) {
|
|
135616
|
-
cleanExtendedConfigCache(extendedConfigCache,
|
|
135616
|
+
cleanExtendedConfigCache(extendedConfigCache, key3, toPath3);
|
|
135617
135617
|
}
|
|
135618
135618
|
});
|
|
135619
135619
|
}
|
|
@@ -135764,10 +135764,10 @@ ${lanes.join("\n")}
|
|
|
135764
135764
|
watchFile: createExcludeHandlingAddWatch("watchFile"),
|
|
135765
135765
|
watchDirectory: createExcludeHandlingAddWatch("watchDirectory")
|
|
135766
135766
|
};
|
|
135767
|
-
function createExcludeHandlingAddWatch(
|
|
135767
|
+
function createExcludeHandlingAddWatch(key3) {
|
|
135768
135768
|
return (file2, cb, flags, options, detailInfo1, detailInfo2) => {
|
|
135769
135769
|
var _a3;
|
|
135770
|
-
return !matchesExclude(file2,
|
|
135770
|
+
return !matchesExclude(file2, key3 === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a3 = host.getCurrentDirectory) == null ? void 0 : _a3.call(host)) || "") ? factory2[key3].call(
|
|
135771
135771
|
/*thisArgs*/
|
|
135772
135772
|
void 0,
|
|
135773
135773
|
file2,
|
|
@@ -135816,13 +135816,13 @@ ${lanes.join("\n")}
|
|
|
135816
135816
|
}
|
|
135817
135817
|
};
|
|
135818
135818
|
}
|
|
135819
|
-
function createTriggerLoggingAddWatch(
|
|
135820
|
-
return (file2, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[
|
|
135819
|
+
function createTriggerLoggingAddWatch(key3) {
|
|
135820
|
+
return (file2, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[key3].call(
|
|
135821
135821
|
/*thisArgs*/
|
|
135822
135822
|
void 0,
|
|
135823
135823
|
file2,
|
|
135824
135824
|
(...args) => {
|
|
135825
|
-
const triggerredInfo = `${
|
|
135825
|
+
const triggerredInfo = `${key3 === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : ""}:: ${getWatchInfo(file2, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`;
|
|
135826
135826
|
log(triggerredInfo);
|
|
135827
135827
|
const start = timestamp3();
|
|
135828
135828
|
cb.call(
|
|
@@ -135991,19 +135991,19 @@ ${lanes.join("\n")}
|
|
|
135991
135991
|
const directoryExistsCache = /* @__PURE__ */ new Map();
|
|
135992
135992
|
const sourceFileCache = /* @__PURE__ */ new Map();
|
|
135993
135993
|
const readFileWithCache = (fileName) => {
|
|
135994
|
-
const
|
|
135995
|
-
const value = readFileCache.get(
|
|
135994
|
+
const key3 = toPath3(fileName);
|
|
135995
|
+
const value = readFileCache.get(key3);
|
|
135996
135996
|
if (value !== void 0) return value !== false ? value : void 0;
|
|
135997
|
-
return setReadFileCache(
|
|
135997
|
+
return setReadFileCache(key3, fileName);
|
|
135998
135998
|
};
|
|
135999
|
-
const setReadFileCache = (
|
|
135999
|
+
const setReadFileCache = (key3, fileName) => {
|
|
136000
136000
|
const newValue = originalReadFile.call(host, fileName);
|
|
136001
|
-
readFileCache.set(
|
|
136001
|
+
readFileCache.set(key3, newValue !== void 0 ? newValue : false);
|
|
136002
136002
|
return newValue;
|
|
136003
136003
|
};
|
|
136004
136004
|
host.readFile = (fileName) => {
|
|
136005
|
-
const
|
|
136006
|
-
const value = readFileCache.get(
|
|
136005
|
+
const key3 = toPath3(fileName);
|
|
136006
|
+
const value = readFileCache.get(key3);
|
|
136007
136007
|
if (value !== void 0) return value !== false ? value : void 0;
|
|
136008
136008
|
if (!fileExtensionIs(
|
|
136009
136009
|
fileName,
|
|
@@ -136012,13 +136012,13 @@ ${lanes.join("\n")}
|
|
|
136012
136012
|
) && !isBuildInfoFile(fileName)) {
|
|
136013
136013
|
return originalReadFile.call(host, fileName);
|
|
136014
136014
|
}
|
|
136015
|
-
return setReadFileCache(
|
|
136015
|
+
return setReadFileCache(key3, fileName);
|
|
136016
136016
|
};
|
|
136017
136017
|
const getSourceFileWithCache = getSourceFile ? (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) => {
|
|
136018
|
-
const
|
|
136018
|
+
const key3 = toPath3(fileName);
|
|
136019
136019
|
const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0;
|
|
136020
136020
|
const forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
|
|
136021
|
-
const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(
|
|
136021
|
+
const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(key3);
|
|
136022
136022
|
if (value) return value;
|
|
136023
136023
|
const sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
|
|
136024
136024
|
if (sourceFile && (isDeclarationFileName(fileName) || fileExtensionIs(
|
|
@@ -136026,31 +136026,31 @@ ${lanes.join("\n")}
|
|
|
136026
136026
|
".json"
|
|
136027
136027
|
/* Json */
|
|
136028
136028
|
))) {
|
|
136029
|
-
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(
|
|
136029
|
+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(key3, sourceFile));
|
|
136030
136030
|
}
|
|
136031
136031
|
return sourceFile;
|
|
136032
136032
|
} : void 0;
|
|
136033
136033
|
host.fileExists = (fileName) => {
|
|
136034
|
-
const
|
|
136035
|
-
const value = fileExistsCache.get(
|
|
136034
|
+
const key3 = toPath3(fileName);
|
|
136035
|
+
const value = fileExistsCache.get(key3);
|
|
136036
136036
|
if (value !== void 0) return value;
|
|
136037
136037
|
const newValue = originalFileExists.call(host, fileName);
|
|
136038
|
-
fileExistsCache.set(
|
|
136038
|
+
fileExistsCache.set(key3, !!newValue);
|
|
136039
136039
|
return newValue;
|
|
136040
136040
|
};
|
|
136041
136041
|
if (originalWriteFile) {
|
|
136042
136042
|
host.writeFile = (fileName, data, ...rest) => {
|
|
136043
|
-
const
|
|
136044
|
-
fileExistsCache.delete(
|
|
136045
|
-
const value = readFileCache.get(
|
|
136043
|
+
const key3 = toPath3(fileName);
|
|
136044
|
+
fileExistsCache.delete(key3);
|
|
136045
|
+
const value = readFileCache.get(key3);
|
|
136046
136046
|
if (value !== void 0 && value !== data) {
|
|
136047
|
-
readFileCache.delete(
|
|
136048
|
-
sourceFileCache.forEach((map22) => map22.delete(
|
|
136047
|
+
readFileCache.delete(key3);
|
|
136048
|
+
sourceFileCache.forEach((map22) => map22.delete(key3));
|
|
136049
136049
|
} else if (getSourceFileWithCache) {
|
|
136050
136050
|
sourceFileCache.forEach((map22) => {
|
|
136051
|
-
const sourceFile = map22.get(
|
|
136051
|
+
const sourceFile = map22.get(key3);
|
|
136052
136052
|
if (sourceFile && sourceFile.text !== data) {
|
|
136053
|
-
map22.delete(
|
|
136053
|
+
map22.delete(key3);
|
|
136054
136054
|
}
|
|
136055
136055
|
});
|
|
136056
136056
|
}
|
|
@@ -136059,17 +136059,17 @@ ${lanes.join("\n")}
|
|
|
136059
136059
|
}
|
|
136060
136060
|
if (originalDirectoryExists) {
|
|
136061
136061
|
host.directoryExists = (directory) => {
|
|
136062
|
-
const
|
|
136063
|
-
const value = directoryExistsCache.get(
|
|
136062
|
+
const key3 = toPath3(directory);
|
|
136063
|
+
const value = directoryExistsCache.get(key3);
|
|
136064
136064
|
if (value !== void 0) return value;
|
|
136065
136065
|
const newValue = originalDirectoryExists.call(host, directory);
|
|
136066
|
-
directoryExistsCache.set(
|
|
136066
|
+
directoryExistsCache.set(key3, !!newValue);
|
|
136067
136067
|
return newValue;
|
|
136068
136068
|
};
|
|
136069
136069
|
if (originalCreateDirectory) {
|
|
136070
136070
|
host.createDirectory = (directory) => {
|
|
136071
|
-
const
|
|
136072
|
-
directoryExistsCache.delete(
|
|
136071
|
+
const key3 = toPath3(directory);
|
|
136072
|
+
directoryExistsCache.delete(key3);
|
|
136073
136073
|
originalCreateDirectory.call(host, directory);
|
|
136074
136074
|
};
|
|
136075
136075
|
}
|
|
@@ -136397,10 +136397,10 @@ ${lanes.join("\n")}
|
|
|
136397
136397
|
for (const entry of entries) {
|
|
136398
136398
|
const name = loader.nameAndMode.getName(entry);
|
|
136399
136399
|
const mode = loader.nameAndMode.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) || options);
|
|
136400
|
-
const
|
|
136401
|
-
let result = cache.get(
|
|
136400
|
+
const key3 = createModeAwareCacheKey(name, mode);
|
|
136401
|
+
let result = cache.get(key3);
|
|
136402
136402
|
if (!result) {
|
|
136403
|
-
cache.set(
|
|
136403
|
+
cache.set(key3, result = loader.resolve(name, mode));
|
|
136404
136404
|
}
|
|
136405
136405
|
resolutions.push(result);
|
|
136406
136406
|
}
|
|
@@ -138879,51 +138879,51 @@ ${lanes.join("\n")}
|
|
|
138879
138879
|
}
|
|
138880
138880
|
}
|
|
138881
138881
|
if (options.paths) {
|
|
138882
|
-
for (const
|
|
138883
|
-
if (!hasProperty(options.paths,
|
|
138882
|
+
for (const key3 in options.paths) {
|
|
138883
|
+
if (!hasProperty(options.paths, key3)) {
|
|
138884
138884
|
continue;
|
|
138885
138885
|
}
|
|
138886
|
-
if (!hasZeroOrOneAsteriskCharacter(
|
|
138886
|
+
if (!hasZeroOrOneAsteriskCharacter(key3)) {
|
|
138887
138887
|
createDiagnosticForOptionPaths(
|
|
138888
138888
|
/*onKey*/
|
|
138889
138889
|
true,
|
|
138890
|
-
|
|
138890
|
+
key3,
|
|
138891
138891
|
Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,
|
|
138892
|
-
|
|
138892
|
+
key3
|
|
138893
138893
|
);
|
|
138894
138894
|
}
|
|
138895
|
-
if (isArray(options.paths[
|
|
138896
|
-
const len = options.paths[
|
|
138895
|
+
if (isArray(options.paths[key3])) {
|
|
138896
|
+
const len = options.paths[key3].length;
|
|
138897
138897
|
if (len === 0) {
|
|
138898
138898
|
createDiagnosticForOptionPaths(
|
|
138899
138899
|
/*onKey*/
|
|
138900
138900
|
false,
|
|
138901
|
-
|
|
138901
|
+
key3,
|
|
138902
138902
|
Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,
|
|
138903
|
-
|
|
138903
|
+
key3
|
|
138904
138904
|
);
|
|
138905
138905
|
}
|
|
138906
138906
|
for (let i = 0; i < len; i++) {
|
|
138907
|
-
const subst = options.paths[
|
|
138907
|
+
const subst = options.paths[key3][i];
|
|
138908
138908
|
const typeOfSubst = typeof subst;
|
|
138909
138909
|
if (typeOfSubst === "string") {
|
|
138910
138910
|
if (!hasZeroOrOneAsteriskCharacter(subst)) {
|
|
138911
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138911
|
+
createDiagnosticForOptionPathKeyValue(key3, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key3);
|
|
138912
138912
|
}
|
|
138913
138913
|
if (!options.baseUrl && !pathIsRelative(subst) && !pathIsAbsolute(subst)) {
|
|
138914
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138914
|
+
createDiagnosticForOptionPathKeyValue(key3, i, Diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash);
|
|
138915
138915
|
}
|
|
138916
138916
|
} else {
|
|
138917
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138917
|
+
createDiagnosticForOptionPathKeyValue(key3, i, Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key3, typeOfSubst);
|
|
138918
138918
|
}
|
|
138919
138919
|
}
|
|
138920
138920
|
} else {
|
|
138921
138921
|
createDiagnosticForOptionPaths(
|
|
138922
138922
|
/*onKey*/
|
|
138923
138923
|
false,
|
|
138924
|
-
|
|
138924
|
+
key3,
|
|
138925
138925
|
Diagnostics.Substitutions_for_pattern_0_should_be_an_array,
|
|
138926
|
-
|
|
138926
|
+
key3
|
|
138927
138927
|
);
|
|
138928
138928
|
}
|
|
138929
138929
|
}
|
|
@@ -139371,11 +139371,11 @@ ${lanes.join("\n")}
|
|
|
139371
139371
|
}
|
|
139372
139372
|
);
|
|
139373
139373
|
}
|
|
139374
|
-
function createDiagnosticForOptionPathKeyValue(
|
|
139374
|
+
function createDiagnosticForOptionPathKeyValue(key3, valueIndex, message, ...args) {
|
|
139375
139375
|
let needCompilerDiagnostic = true;
|
|
139376
139376
|
forEachOptionPathsSyntax((pathProp) => {
|
|
139377
139377
|
if (isObjectLiteralExpression(pathProp.initializer)) {
|
|
139378
|
-
forEachPropertyAssignment(pathProp.initializer,
|
|
139378
|
+
forEachPropertyAssignment(pathProp.initializer, key3, (keyProps) => {
|
|
139379
139379
|
const initializer3 = keyProps.initializer;
|
|
139380
139380
|
if (isArrayLiteralExpression(initializer3) && initializer3.elements.length > valueIndex) {
|
|
139381
139381
|
programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer3.elements[valueIndex], message, ...args));
|
|
@@ -139388,13 +139388,13 @@ ${lanes.join("\n")}
|
|
|
139388
139388
|
createCompilerOptionsDiagnostic(message, ...args);
|
|
139389
139389
|
}
|
|
139390
139390
|
}
|
|
139391
|
-
function createDiagnosticForOptionPaths(onKey,
|
|
139391
|
+
function createDiagnosticForOptionPaths(onKey, key3, message, ...args) {
|
|
139392
139392
|
let needCompilerDiagnostic = true;
|
|
139393
139393
|
forEachOptionPathsSyntax((pathProp) => {
|
|
139394
139394
|
if (isObjectLiteralExpression(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax(
|
|
139395
139395
|
pathProp.initializer,
|
|
139396
139396
|
onKey,
|
|
139397
|
-
|
|
139397
|
+
key3,
|
|
139398
139398
|
/*key2*/
|
|
139399
139399
|
void 0,
|
|
139400
139400
|
message,
|
|
@@ -139479,7 +139479,7 @@ ${lanes.join("\n")}
|
|
|
139479
139479
|
}
|
|
139480
139480
|
return _compilerOptionsPropertySyntax || void 0;
|
|
139481
139481
|
}
|
|
139482
|
-
function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1,
|
|
139482
|
+
function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key22, message, ...args) {
|
|
139483
139483
|
let needsCompilerDiagnostic = false;
|
|
139484
139484
|
forEachPropertyAssignment(objectLiteral, key1, (prop) => {
|
|
139485
139485
|
if ("messageText" in message) {
|
|
@@ -139488,7 +139488,7 @@ ${lanes.join("\n")}
|
|
|
139488
139488
|
programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args));
|
|
139489
139489
|
}
|
|
139490
139490
|
needsCompilerDiagnostic = true;
|
|
139491
|
-
},
|
|
139491
|
+
}, key22);
|
|
139492
139492
|
return needsCompilerDiagnostic;
|
|
139493
139493
|
}
|
|
139494
139494
|
function blockEmittingOfFile(emitFileName, diag2) {
|
|
@@ -140408,8 +140408,8 @@ ${lanes.join("\n")}
|
|
|
140408
140408
|
seenMap.add(path);
|
|
140409
140409
|
const references = state.referencedMap.getValues(path);
|
|
140410
140410
|
if (references) {
|
|
140411
|
-
for (const
|
|
140412
|
-
queue.push(
|
|
140411
|
+
for (const key3 of references.keys()) {
|
|
140412
|
+
queue.push(key3);
|
|
140413
140413
|
}
|
|
140414
140414
|
}
|
|
140415
140415
|
}
|
|
@@ -140541,7 +140541,7 @@ ${lanes.join("\n")}
|
|
|
140541
140541
|
return result;
|
|
140542
140542
|
}
|
|
140543
140543
|
function hasSameKeys(map1, map22) {
|
|
140544
|
-
return map1 === map22 || map1 !== void 0 && map22 !== void 0 && map1.size === map22.size && !forEachKey(map1, (
|
|
140544
|
+
return map1 === map22 || map1 !== void 0 && map22 !== void 0 && map1.size === map22.size && !forEachKey(map1, (key3) => !map22.has(key3));
|
|
140545
140545
|
}
|
|
140546
140546
|
function createBuilderProgramState(newProgram, oldState) {
|
|
140547
140547
|
var _a3, _b;
|
|
@@ -141099,9 +141099,9 @@ ${lanes.join("\n")}
|
|
|
141099
141099
|
}
|
|
141100
141100
|
const root = [];
|
|
141101
141101
|
if (state.compilerOptions.outFile) {
|
|
141102
|
-
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([
|
|
141103
|
-
const fileId = toFileId(
|
|
141104
|
-
tryAddRoot(
|
|
141102
|
+
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key3, value]) => {
|
|
141103
|
+
const fileId = toFileId(key3);
|
|
141104
|
+
tryAddRoot(key3, fileId);
|
|
141105
141105
|
return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
|
|
141106
141106
|
});
|
|
141107
141107
|
const buildInfo2 = {
|
|
@@ -141132,17 +141132,17 @@ ${lanes.join("\n")}
|
|
|
141132
141132
|
let fileIdsList;
|
|
141133
141133
|
let fileNamesToFileIdListId;
|
|
141134
141134
|
let emitSignatures;
|
|
141135
|
-
const fileInfos = arrayFrom(state.fileInfos.entries(), ([
|
|
141135
|
+
const fileInfos = arrayFrom(state.fileInfos.entries(), ([key3, value]) => {
|
|
141136
141136
|
var _a22, _b2;
|
|
141137
|
-
const fileId = toFileId(
|
|
141138
|
-
tryAddRoot(
|
|
141139
|
-
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(
|
|
141140
|
-
const oldSignature = (_a22 = state.oldSignatures) == null ? void 0 : _a22.get(
|
|
141137
|
+
const fileId = toFileId(key3);
|
|
141138
|
+
tryAddRoot(key3, fileId);
|
|
141139
|
+
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key3));
|
|
141140
|
+
const oldSignature = (_a22 = state.oldSignatures) == null ? void 0 : _a22.get(key3);
|
|
141141
141141
|
const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
|
|
141142
141142
|
if (state.compilerOptions.composite) {
|
|
141143
|
-
const file2 = state.program.getSourceFileByPath(
|
|
141143
|
+
const file2 = state.program.getSourceFileByPath(key3);
|
|
141144
141144
|
if (!isJsonSourceFile(file2) && sourceFileMayBeEmitted(file2, state.program)) {
|
|
141145
|
-
const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(
|
|
141145
|
+
const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key3);
|
|
141146
141146
|
if (emitSignature !== actualSignature) {
|
|
141147
141147
|
emitSignatures = append(
|
|
141148
141148
|
emitSignatures,
|
|
@@ -141177,9 +141177,9 @@ ${lanes.join("\n")}
|
|
|
141177
141177
|
});
|
|
141178
141178
|
let referencedMap;
|
|
141179
141179
|
if ((_a3 = state.referencedMap) == null ? void 0 : _a3.size()) {
|
|
141180
|
-
referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((
|
|
141181
|
-
toFileId(
|
|
141182
|
-
toFileIdListId(state.referencedMap.getValues(
|
|
141180
|
+
referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((key3) => [
|
|
141181
|
+
toFileId(key3),
|
|
141182
|
+
toFileIdListId(state.referencedMap.getValues(key3))
|
|
141183
141183
|
]);
|
|
141184
141184
|
}
|
|
141185
141185
|
const semanticDiagnosticsPerFile = toIncrementalBuildInfoDiagnostics();
|
|
@@ -141241,11 +141241,11 @@ ${lanes.join("\n")}
|
|
|
141241
141241
|
}
|
|
141242
141242
|
function toFileIdListId(set2) {
|
|
141243
141243
|
const fileIds = arrayFrom(set2.keys(), toFileId).sort(compareValues);
|
|
141244
|
-
const
|
|
141245
|
-
let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(
|
|
141244
|
+
const key3 = fileIds.join();
|
|
141245
|
+
let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(key3);
|
|
141246
141246
|
if (fileIdListId === void 0) {
|
|
141247
141247
|
fileIdsList = append(fileIdsList, fileIds);
|
|
141248
|
-
(fileNamesToFileIdListId ?? (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(
|
|
141248
|
+
(fileNamesToFileIdListId ?? (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(key3, fileIdListId = fileIdsList.length);
|
|
141249
141249
|
}
|
|
141250
141250
|
return fileIdListId;
|
|
141251
141251
|
}
|
|
@@ -141305,14 +141305,14 @@ ${lanes.join("\n")}
|
|
|
141305
141305
|
}
|
|
141306
141306
|
function toIncrementalBuildInfoDiagnostics() {
|
|
141307
141307
|
let result;
|
|
141308
|
-
state.fileInfos.forEach((_value,
|
|
141309
|
-
const value = state.semanticDiagnosticsPerFile.get(
|
|
141308
|
+
state.fileInfos.forEach((_value, key3) => {
|
|
141309
|
+
const value = state.semanticDiagnosticsPerFile.get(key3);
|
|
141310
141310
|
if (!value) {
|
|
141311
|
-
if (!state.changedFilesSet.has(
|
|
141311
|
+
if (!state.changedFilesSet.has(key3)) result = append(result, toFileId(key3));
|
|
141312
141312
|
} else if (value.length) {
|
|
141313
141313
|
result = append(result, [
|
|
141314
|
-
toFileId(
|
|
141315
|
-
toReusableDiagnostic(value,
|
|
141314
|
+
toFileId(key3),
|
|
141315
|
+
toReusableDiagnostic(value, key3)
|
|
141316
141316
|
]);
|
|
141317
141317
|
}
|
|
141318
141318
|
});
|
|
@@ -141322,11 +141322,11 @@ ${lanes.join("\n")}
|
|
|
141322
141322
|
var _a22;
|
|
141323
141323
|
let result;
|
|
141324
141324
|
if (!((_a22 = state.emitDiagnosticsPerFile) == null ? void 0 : _a22.size)) return result;
|
|
141325
|
-
for (const
|
|
141326
|
-
const value = state.emitDiagnosticsPerFile.get(
|
|
141325
|
+
for (const key3 of arrayFrom(state.emitDiagnosticsPerFile.keys()).sort(compareStringsCaseSensitive)) {
|
|
141326
|
+
const value = state.emitDiagnosticsPerFile.get(key3);
|
|
141327
141327
|
result = append(result, [
|
|
141328
|
-
toFileId(
|
|
141329
|
-
toReusableDiagnostic(value,
|
|
141328
|
+
toFileId(key3),
|
|
141329
|
+
toReusableDiagnostic(value, key3)
|
|
141330
141330
|
]);
|
|
141331
141331
|
}
|
|
141332
141332
|
return result;
|
|
@@ -141906,12 +141906,12 @@ ${lanes.join("\n")}
|
|
|
141906
141906
|
(_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
|
|
141907
141907
|
if (isNumber(value)) emitSignatures.delete(toFilePath(value));
|
|
141908
141908
|
else {
|
|
141909
|
-
const
|
|
141909
|
+
const key3 = toFilePath(value[0]);
|
|
141910
141910
|
emitSignatures.set(
|
|
141911
|
-
|
|
141911
|
+
key3,
|
|
141912
141912
|
!isString(value[1]) && !value[1].length ? (
|
|
141913
141913
|
// File signature is emit signature but differs in map
|
|
141914
|
-
[emitSignatures.get(
|
|
141914
|
+
[emitSignatures.get(key3)]
|
|
141915
141915
|
) : value[1]
|
|
141916
141916
|
);
|
|
141917
141917
|
}
|
|
@@ -141977,7 +141977,7 @@ ${lanes.join("\n")}
|
|
|
141977
141977
|
const semanticDiagnostics = new Map(
|
|
141978
141978
|
mapDefinedIterator(
|
|
141979
141979
|
fileInfos.keys(),
|
|
141980
|
-
(
|
|
141980
|
+
(key3) => !changedFilesSet.has(key3) ? [key3, emptyArray] : void 0
|
|
141981
141981
|
)
|
|
141982
141982
|
);
|
|
141983
141983
|
diagnostics == null ? void 0 : diagnostics.forEach((value) => {
|
|
@@ -142738,9 +142738,9 @@ ${lanes.join("\n")}
|
|
|
142738
142738
|
}
|
|
142739
142739
|
const resolved = getResolutionWithResolvedFileName(resolution);
|
|
142740
142740
|
if (resolved && resolved.resolvedFileName) {
|
|
142741
|
-
const
|
|
142742
|
-
let resolutions = resolvedFileToResolution.get(
|
|
142743
|
-
if (!resolutions) resolvedFileToResolution.set(
|
|
142741
|
+
const key3 = resolutionHost.toPath(resolved.resolvedFileName);
|
|
142742
|
+
let resolutions = resolvedFileToResolution.get(key3);
|
|
142743
|
+
if (!resolutions) resolvedFileToResolution.set(key3, resolutions = /* @__PURE__ */ new Set());
|
|
142744
142744
|
resolutions.add(resolution);
|
|
142745
142745
|
}
|
|
142746
142746
|
}
|
|
@@ -142977,9 +142977,9 @@ ${lanes.join("\n")}
|
|
|
142977
142977
|
resolution.files = void 0;
|
|
142978
142978
|
const resolved = getResolutionWithResolvedFileName(resolution);
|
|
142979
142979
|
if (resolved && resolved.resolvedFileName) {
|
|
142980
|
-
const
|
|
142981
|
-
const resolutions = resolvedFileToResolution.get(
|
|
142982
|
-
if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) resolvedFileToResolution.delete(
|
|
142980
|
+
const key3 = resolutionHost.toPath(resolved.resolvedFileName);
|
|
142981
|
+
const resolutions = resolvedFileToResolution.get(key3);
|
|
142982
|
+
if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) resolvedFileToResolution.delete(key3);
|
|
142983
142983
|
}
|
|
142984
142984
|
const { failedLookupLocations, affectingLocations, alternateResult } = resolution;
|
|
142985
142985
|
if (resolutionsWithFailedLookups.delete(resolution)) {
|
|
@@ -145842,8 +145842,8 @@ ${lanes.join("\n")}
|
|
|
145842
145842
|
}
|
|
145843
145843
|
}
|
|
145844
145844
|
}
|
|
145845
|
-
outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value,
|
|
145846
|
-
if (!(skipOutputs == null ? void 0 : skipOutputs.has(
|
|
145845
|
+
outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value, key3) => {
|
|
145846
|
+
if (!(skipOutputs == null ? void 0 : skipOutputs.has(key3)) && !modifiedOutputs.has(key3)) outputTimeStampMap.delete(key3);
|
|
145847
145847
|
});
|
|
145848
145848
|
}
|
|
145849
145849
|
function getLatestChangedDtsTime(state, options, resolvedConfigPath) {
|
|
@@ -146464,9 +146464,9 @@ ${lanes.join("\n")}
|
|
|
146464
146464
|
function countLines(program) {
|
|
146465
146465
|
const counts2 = getCountsMap();
|
|
146466
146466
|
forEach(program.getSourceFiles(), (file2) => {
|
|
146467
|
-
const
|
|
146467
|
+
const key3 = getCountKey(program, file2);
|
|
146468
146468
|
const lineCount = getLineStarts(file2).length;
|
|
146469
|
-
counts2.set(
|
|
146469
|
+
counts2.set(key3, counts2.get(key3) + lineCount);
|
|
146470
146470
|
});
|
|
146471
146471
|
return counts2;
|
|
146472
146472
|
}
|
|
@@ -146769,8 +146769,8 @@ ${lanes.join("\n")}
|
|
|
146769
146769
|
optionsOfCurCategory.push(option);
|
|
146770
146770
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
146771
146771
|
}
|
|
146772
|
-
categoryMap.forEach((value,
|
|
146773
|
-
res.push(`### ${
|
|
146772
|
+
categoryMap.forEach((value, key3) => {
|
|
146773
|
+
res.push(`### ${key3}${sys2.newLine}${sys2.newLine}`);
|
|
146774
146774
|
res = [...res, ...generateGroupOptionOutput(sys2, value)];
|
|
146775
146775
|
});
|
|
146776
146776
|
if (afterOptionsDescription) {
|
|
@@ -147479,8 +147479,8 @@ ${lanes.join("\n")}
|
|
|
147479
147479
|
reportCountStatistic("Files", program.getSourceFiles().length);
|
|
147480
147480
|
const lineCounts = countLines(program);
|
|
147481
147481
|
if (compilerOptions.extendedDiagnostics) {
|
|
147482
|
-
for (const [
|
|
147483
|
-
reportCountStatistic("Lines of " +
|
|
147482
|
+
for (const [key3, value] of lineCounts.entries()) {
|
|
147483
|
+
reportCountStatistic("Lines of " + key3, value);
|
|
147484
147484
|
}
|
|
147485
147485
|
} else {
|
|
147486
147486
|
reportCountStatistic("Lines", reduceLeftIterator(lineCounts.values(), (sum, count) => sum + count, 0));
|
|
@@ -151971,8 +151971,8 @@ ${lanes.join("\n")}
|
|
|
151971
151971
|
const content = tryParseJson(stringContent);
|
|
151972
151972
|
const info = {};
|
|
151973
151973
|
if (content) {
|
|
151974
|
-
for (const
|
|
151975
|
-
const dependencies = content[
|
|
151974
|
+
for (const key3 of dependencyKeys) {
|
|
151975
|
+
const dependencies = content[key3];
|
|
151976
151976
|
if (!dependencies) {
|
|
151977
151977
|
continue;
|
|
151978
151978
|
}
|
|
@@ -151980,7 +151980,7 @@ ${lanes.join("\n")}
|
|
|
151980
151980
|
for (const packageName in dependencies) {
|
|
151981
151981
|
dependencyMap.set(packageName, dependencies[packageName]);
|
|
151982
151982
|
}
|
|
151983
|
-
info[
|
|
151983
|
+
info[key3] = dependencyMap;
|
|
151984
151984
|
}
|
|
151985
151985
|
}
|
|
151986
151986
|
const dependencyGroups = [
|
|
@@ -152493,7 +152493,7 @@ ${lanes.join("\n")}
|
|
|
152493
152493
|
const storedSymbol = symbol2.flags & 33554432 ? void 0 : symbol2;
|
|
152494
152494
|
const storedModuleSymbol = moduleSymbol.flags & 33554432 ? void 0 : moduleSymbol;
|
|
152495
152495
|
if (!storedSymbol || !storedModuleSymbol) symbols.set(id, [symbol2, moduleSymbol]);
|
|
152496
|
-
exportInfo.add(
|
|
152496
|
+
exportInfo.add(key3(symbolName2, symbol2, isExternalModuleNameRelative(moduleName) ? void 0 : moduleName, checker), {
|
|
152497
152497
|
id,
|
|
152498
152498
|
symbolTableKey,
|
|
152499
152499
|
symbolName: symbolName2,
|
|
@@ -152585,7 +152585,7 @@ ${lanes.join("\n")}
|
|
|
152585
152585
|
isFromPackageJson
|
|
152586
152586
|
};
|
|
152587
152587
|
}
|
|
152588
|
-
function
|
|
152588
|
+
function key3(importedName, symbol2, ambientModuleName, checker) {
|
|
152589
152589
|
const moduleKey = ambientModuleName || "";
|
|
152590
152590
|
return `${importedName.length} ${getSymbolId(skipAlias(symbol2, checker))} ${importedName} ${moduleKey}`;
|
|
152591
152591
|
}
|
|
@@ -152811,12 +152811,12 @@ ${lanes.join("\n")}
|
|
|
152811
152811
|
checker
|
|
152812
152812
|
);
|
|
152813
152813
|
}
|
|
152814
|
-
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported,
|
|
152815
|
-
if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports,
|
|
152814
|
+
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key3) => {
|
|
152815
|
+
if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports, key3)) {
|
|
152816
152816
|
cache.add(
|
|
152817
152817
|
importingFile.path,
|
|
152818
152818
|
exported,
|
|
152819
|
-
|
|
152819
|
+
key3,
|
|
152820
152820
|
moduleSymbol,
|
|
152821
152821
|
moduleFile,
|
|
152822
152822
|
0,
|
|
@@ -154406,15 +154406,15 @@ ${lanes.join("\n")}
|
|
|
154406
154406
|
}
|
|
154407
154407
|
function acquireDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154408
154408
|
const path = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154409
|
-
const
|
|
154410
|
-
return acquireDocumentWithKey(fileName, path, compilationSettings,
|
|
154409
|
+
const key3 = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
154410
|
+
return acquireDocumentWithKey(fileName, path, compilationSettings, key3, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
154411
154411
|
}
|
|
154412
|
-
function acquireDocumentWithKey(fileName, path, compilationSettings,
|
|
154412
|
+
function acquireDocumentWithKey(fileName, path, compilationSettings, key3, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154413
154413
|
return acquireOrUpdateDocument(
|
|
154414
154414
|
fileName,
|
|
154415
154415
|
path,
|
|
154416
154416
|
compilationSettings,
|
|
154417
|
-
|
|
154417
|
+
key3,
|
|
154418
154418
|
scriptSnapshot,
|
|
154419
154419
|
version22,
|
|
154420
154420
|
/*acquiring*/
|
|
@@ -154425,15 +154425,15 @@ ${lanes.join("\n")}
|
|
|
154425
154425
|
}
|
|
154426
154426
|
function updateDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154427
154427
|
const path = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154428
|
-
const
|
|
154429
|
-
return updateDocumentWithKey(fileName, path, compilationSettings,
|
|
154428
|
+
const key3 = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
154429
|
+
return updateDocumentWithKey(fileName, path, compilationSettings, key3, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
154430
154430
|
}
|
|
154431
|
-
function updateDocumentWithKey(fileName, path, compilationSettings,
|
|
154431
|
+
function updateDocumentWithKey(fileName, path, compilationSettings, key3, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154432
154432
|
return acquireOrUpdateDocument(
|
|
154433
154433
|
fileName,
|
|
154434
154434
|
path,
|
|
154435
154435
|
getCompilationSettings(compilationSettings),
|
|
154436
|
-
|
|
154436
|
+
key3,
|
|
154437
154437
|
scriptSnapshot,
|
|
154438
154438
|
version22,
|
|
154439
154439
|
/*acquiring*/
|
|
@@ -154447,7 +154447,7 @@ ${lanes.join("\n")}
|
|
|
154447
154447
|
Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`);
|
|
154448
154448
|
return entry;
|
|
154449
154449
|
}
|
|
154450
|
-
function acquireOrUpdateDocument(fileName, path, compilationSettingsOrHost,
|
|
154450
|
+
function acquireOrUpdateDocument(fileName, path, compilationSettingsOrHost, key3, scriptSnapshot, version22, acquiring, scriptKind, languageVersionOrOptions) {
|
|
154451
154451
|
var _a3, _b, _c, _d;
|
|
154452
154452
|
scriptKind = ensureScriptKind(fileName, scriptKind);
|
|
154453
154453
|
const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
|
|
@@ -154462,7 +154462,7 @@ ${lanes.join("\n")}
|
|
|
154462
154462
|
sourceFileOptions.languageVersion = scriptTarget;
|
|
154463
154463
|
Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);
|
|
154464
154464
|
const oldBucketCount = buckets.size;
|
|
154465
|
-
const keyWithMode = getDocumentRegistryBucketKeyWithMode(
|
|
154465
|
+
const keyWithMode = getDocumentRegistryBucketKeyWithMode(key3, sourceFileOptions.impliedNodeFormat);
|
|
154466
154466
|
const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());
|
|
154467
154467
|
if (tracing) {
|
|
154468
154468
|
if (buckets.size > oldBucketCount) {
|
|
@@ -154532,11 +154532,11 @@ ${lanes.join("\n")}
|
|
|
154532
154532
|
}
|
|
154533
154533
|
function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
|
|
154534
154534
|
const path = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154535
|
-
const
|
|
154536
|
-
return releaseDocumentWithKey(path,
|
|
154535
|
+
const key3 = getKeyForCompilationSettings(compilationSettings);
|
|
154536
|
+
return releaseDocumentWithKey(path, key3, scriptKind, impliedNodeFormat);
|
|
154537
154537
|
}
|
|
154538
|
-
function releaseDocumentWithKey(path,
|
|
154539
|
-
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(
|
|
154538
|
+
function releaseDocumentWithKey(path, key3, scriptKind, impliedNodeFormat) {
|
|
154539
|
+
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key3, impliedNodeFormat)));
|
|
154540
154540
|
const bucketEntry = bucket.get(path);
|
|
154541
154541
|
const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
154542
154542
|
entry.languageServiceRefCount--;
|
|
@@ -154568,8 +154568,8 @@ ${lanes.join("\n")}
|
|
|
154568
154568
|
function getKeyForCompilationSettings(settings) {
|
|
154569
154569
|
return getKeyForCompilerOptions(settings, sourceFileAffectingCompilerOptions);
|
|
154570
154570
|
}
|
|
154571
|
-
function getDocumentRegistryBucketKeyWithMode(
|
|
154572
|
-
return mode ? `${
|
|
154571
|
+
function getDocumentRegistryBucketKeyWithMode(key3, mode) {
|
|
154572
|
+
return mode ? `${key3}|${mode}` : key3;
|
|
154573
154573
|
}
|
|
154574
154574
|
function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
|
|
154575
154575
|
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
@@ -155857,9 +155857,9 @@ interface Symbol {
|
|
|
155857
155857
|
const diagnostics = [];
|
|
155858
155858
|
const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};
|
|
155859
155859
|
const defaultOptions = getDefaultCompilerOptions2();
|
|
155860
|
-
for (const
|
|
155861
|
-
if (hasProperty(defaultOptions,
|
|
155862
|
-
options[
|
|
155860
|
+
for (const key3 in defaultOptions) {
|
|
155861
|
+
if (hasProperty(defaultOptions, key3) && options[key3] === void 0) {
|
|
155862
|
+
options[key3] = defaultOptions[key3];
|
|
155863
155863
|
}
|
|
155864
155864
|
}
|
|
155865
155865
|
for (const option of transpileOptionValueCompilerOptions) {
|
|
@@ -163301,8 +163301,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163301
163301
|
}
|
|
163302
163302
|
function toEditorSettings(optionsAsMap) {
|
|
163303
163303
|
let allPropertiesAreCamelCased = true;
|
|
163304
|
-
for (const
|
|
163305
|
-
if (hasProperty(optionsAsMap,
|
|
163304
|
+
for (const key3 in optionsAsMap) {
|
|
163305
|
+
if (hasProperty(optionsAsMap, key3) && !isCamelCase(key3)) {
|
|
163306
163306
|
allPropertiesAreCamelCased = false;
|
|
163307
163307
|
break;
|
|
163308
163308
|
}
|
|
@@ -163311,10 +163311,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163311
163311
|
return optionsAsMap;
|
|
163312
163312
|
}
|
|
163313
163313
|
const settings = {};
|
|
163314
|
-
for (const
|
|
163315
|
-
if (hasProperty(optionsAsMap,
|
|
163316
|
-
const newKey = isCamelCase(
|
|
163317
|
-
settings[newKey] = optionsAsMap[
|
|
163314
|
+
for (const key3 in optionsAsMap) {
|
|
163315
|
+
if (hasProperty(optionsAsMap, key3)) {
|
|
163316
|
+
const newKey = isCamelCase(key3) ? key3 : key3.charAt(0).toLowerCase() + key3.substr(1);
|
|
163317
|
+
settings[newKey] = optionsAsMap[key3];
|
|
163318
163318
|
}
|
|
163319
163319
|
}
|
|
163320
163320
|
return settings;
|
|
@@ -163812,8 +163812,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163812
163812
|
}
|
|
163813
163813
|
function cleanupSemanticCache() {
|
|
163814
163814
|
if (program) {
|
|
163815
|
-
const
|
|
163816
|
-
forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath,
|
|
163815
|
+
const key3 = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions());
|
|
163816
|
+
forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key3, f.scriptKind, f.impliedNodeFormat));
|
|
163817
163817
|
program = void 0;
|
|
163818
163818
|
}
|
|
163819
163819
|
}
|
|
@@ -164277,7 +164277,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164277
164277
|
]: 30
|
|
164278
164278
|
/* LessThanToken */
|
|
164279
164279
|
}));
|
|
164280
|
-
braceMatching.forEach((value,
|
|
164280
|
+
braceMatching.forEach((value, key3) => braceMatching.set(value.toString(), Number(key3)));
|
|
164281
164281
|
function getBraceMatchingAtPosition(fileName, position) {
|
|
164282
164282
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
164283
164283
|
const token = getTouchingToken(sourceFile, position);
|
|
@@ -164302,11 +164302,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164302
164302
|
function getFormattingEditsForDocument(fileName, options) {
|
|
164303
164303
|
return ts_formatting_exports.formatDocument(syntaxTreeCache.getCurrentSourceFile(fileName), ts_formatting_exports.getFormatContext(toEditorSettings(options), host));
|
|
164304
164304
|
}
|
|
164305
|
-
function getFormattingEditsAfterKeystroke(fileName, position,
|
|
164305
|
+
function getFormattingEditsAfterKeystroke(fileName, position, key3, options) {
|
|
164306
164306
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
164307
164307
|
const formatContext = ts_formatting_exports.getFormatContext(toEditorSettings(options), host);
|
|
164308
164308
|
if (!isInComment(sourceFile, position)) {
|
|
164309
|
-
switch (
|
|
164309
|
+
switch (key3) {
|
|
164310
164310
|
case "{":
|
|
164311
164311
|
return ts_formatting_exports.formatOnOpeningCurly(position, sourceFile, formatContext);
|
|
164312
164312
|
case "}":
|
|
@@ -164876,15 +164876,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164876
164876
|
break;
|
|
164877
164877
|
case 1:
|
|
164878
164878
|
invalidOperationsInPartialSemanticMode.forEach(
|
|
164879
|
-
(
|
|
164880
|
-
throw new Error(`LanguageService Operation: ${
|
|
164879
|
+
(key3) => ls[key3] = () => {
|
|
164880
|
+
throw new Error(`LanguageService Operation: ${key3} not allowed in LanguageServiceMode.PartialSemantic`);
|
|
164881
164881
|
}
|
|
164882
164882
|
);
|
|
164883
164883
|
break;
|
|
164884
164884
|
case 2:
|
|
164885
164885
|
invalidOperationsInSyntacticMode.forEach(
|
|
164886
|
-
(
|
|
164887
|
-
throw new Error(`LanguageService Operation: ${
|
|
164886
|
+
(key3) => ls[key3] = () => {
|
|
164887
|
+
throw new Error(`LanguageService Operation: ${key3} not allowed in LanguageServiceMode.Syntactic`);
|
|
164888
164888
|
}
|
|
164889
164889
|
);
|
|
164890
164890
|
break;
|
|
@@ -167057,9 +167057,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167057
167057
|
});
|
|
167058
167058
|
}
|
|
167059
167059
|
if (symbol2.members) {
|
|
167060
|
-
symbol2.members.forEach((member,
|
|
167060
|
+
symbol2.members.forEach((member, key3) => {
|
|
167061
167061
|
var _a3, _b, _c, _d;
|
|
167062
|
-
if (
|
|
167062
|
+
if (key3 === "constructor" && member.valueDeclaration) {
|
|
167063
167063
|
const prototypeAssignment = (_d = (_c = (_b = (_a3 = symbol2.exports) == null ? void 0 : _a3.get("prototype")) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.parent;
|
|
167064
167064
|
if (prototypeAssignment && isBinaryExpression(prototypeAssignment) && isObjectLiteralExpression(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) {
|
|
167065
167065
|
} else {
|
|
@@ -167542,10 +167542,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167542
167542
|
if (continuationArgName && !shouldReturn(node, transformer)) {
|
|
167543
167543
|
if (isSynthIdentifier(continuationArgName)) {
|
|
167544
167544
|
possibleNameForVarDecl = continuationArgName;
|
|
167545
|
-
transformer.synthNamesMap.forEach((val,
|
|
167545
|
+
transformer.synthNamesMap.forEach((val, key3) => {
|
|
167546
167546
|
if (val.identifier.text === continuationArgName.identifier.text) {
|
|
167547
167547
|
const newSynthName = createUniqueSynthName(continuationArgName);
|
|
167548
|
-
transformer.synthNamesMap.set(
|
|
167548
|
+
transformer.synthNamesMap.set(key3, newSynthName);
|
|
167549
167549
|
}
|
|
167550
167550
|
});
|
|
167551
167551
|
} else {
|
|
@@ -169659,8 +169659,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
169659
169659
|
);
|
|
169660
169660
|
});
|
|
169661
169661
|
let newDeclarations;
|
|
169662
|
-
newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport },
|
|
169663
|
-
const moduleSpecifier =
|
|
169662
|
+
newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport }, key3) => {
|
|
169663
|
+
const moduleSpecifier = key3.slice(2);
|
|
169664
169664
|
const getDeclarations = useRequire ? getNewRequires : getNewImports;
|
|
169665
169665
|
const declarations = getDeclarations(
|
|
169666
169666
|
moduleSpecifier,
|
|
@@ -176059,8 +176059,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
176059
176059
|
}
|
|
176060
176060
|
var fixName4 = "disableJsDiagnostics";
|
|
176061
176061
|
var fixId42 = "disableJsDiagnostics";
|
|
176062
|
-
var errorCodes53 = mapDefined(Object.keys(Diagnostics), (
|
|
176063
|
-
const diag2 = Diagnostics[
|
|
176062
|
+
var errorCodes53 = mapDefined(Object.keys(Diagnostics), (key3) => {
|
|
176063
|
+
const diag2 = Diagnostics[key3];
|
|
176064
176064
|
return diag2.category === 1 ? diag2.code : void 0;
|
|
176065
176065
|
});
|
|
176066
176066
|
registerCodeFix({
|
|
@@ -182783,7 +182783,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182783
182783
|
return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath2(name) };
|
|
182784
182784
|
}
|
|
182785
182785
|
function addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, paths) {
|
|
182786
|
-
const getPatternsForKey = (
|
|
182786
|
+
const getPatternsForKey = (key3) => paths[key3];
|
|
182787
182787
|
const comparePaths2 = (a, b) => {
|
|
182788
182788
|
const patternA = tryParsePattern(a);
|
|
182789
182789
|
const patternB = tryParsePattern(b);
|
|
@@ -182811,10 +182811,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182811
182811
|
function addCompletionEntriesFromPathsOrExportsOrImports(result, isExports, isImports, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, keys, getPatternsForKey, comparePaths2) {
|
|
182812
182812
|
let pathResults = [];
|
|
182813
182813
|
let matchedPath;
|
|
182814
|
-
for (const
|
|
182815
|
-
if (
|
|
182816
|
-
const keyWithoutLeadingDotSlash =
|
|
182817
|
-
const patterns = getPatternsForKey(
|
|
182814
|
+
for (const key3 of keys) {
|
|
182815
|
+
if (key3 === ".") continue;
|
|
182816
|
+
const keyWithoutLeadingDotSlash = key3.replace(/^\.\//, "") + ((isExports || isImports) && endsWith(key3, "/") ? "*" : "");
|
|
182817
|
+
const patterns = getPatternsForKey(key3);
|
|
182818
182818
|
if (patterns) {
|
|
182819
182819
|
const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash);
|
|
182820
182820
|
if (!pathPattern) continue;
|
|
@@ -182987,12 +182987,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182987
182987
|
host,
|
|
182988
182988
|
moduleSpecifierResolutionHost,
|
|
182989
182989
|
keys,
|
|
182990
|
-
(
|
|
182991
|
-
const pattern = getPatternFromFirstMatchingCondition(lookupTable[
|
|
182990
|
+
(key3) => {
|
|
182991
|
+
const pattern = getPatternFromFirstMatchingCondition(lookupTable[key3], conditions);
|
|
182992
182992
|
if (pattern === void 0) {
|
|
182993
182993
|
return void 0;
|
|
182994
182994
|
}
|
|
182995
|
-
return singleElementArray(endsWith(
|
|
182995
|
+
return singleElementArray(endsWith(key3, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern);
|
|
182996
182996
|
},
|
|
182997
182997
|
comparePatternKeys
|
|
182998
182998
|
);
|
|
@@ -183219,8 +183219,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
183219
183219
|
const result = [];
|
|
183220
183220
|
for (const packageJson of findPackageJsons(scriptPath, host)) {
|
|
183221
183221
|
const contents = readJson(packageJson, host);
|
|
183222
|
-
for (const
|
|
183223
|
-
const dependencies = contents[
|
|
183222
|
+
for (const key3 of nodeModulesDependencyKeys) {
|
|
183223
|
+
const dependencies = contents[key3];
|
|
183224
183224
|
if (!dependencies) continue;
|
|
183225
183225
|
for (const dep in dependencies) {
|
|
183226
183226
|
if (hasProperty(dependencies, dep) && !startsWith(dep, "@types/")) {
|
|
@@ -185424,19 +185424,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
185424
185424
|
if (symbol2 === parent2) {
|
|
185425
185425
|
return true;
|
|
185426
185426
|
}
|
|
185427
|
-
const
|
|
185428
|
-
const cached2 = cachedResults.get(
|
|
185427
|
+
const key3 = getSymbolId(symbol2) + "," + getSymbolId(parent2);
|
|
185428
|
+
const cached2 = cachedResults.get(key3);
|
|
185429
185429
|
if (cached2 !== void 0) {
|
|
185430
185430
|
return cached2;
|
|
185431
185431
|
}
|
|
185432
|
-
cachedResults.set(
|
|
185432
|
+
cachedResults.set(key3, false);
|
|
185433
185433
|
const inherits = !!symbol2.declarations && symbol2.declarations.some(
|
|
185434
185434
|
(declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => {
|
|
185435
185435
|
const type = checker.getTypeAtLocation(typeReference);
|
|
185436
185436
|
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker);
|
|
185437
185437
|
})
|
|
185438
185438
|
);
|
|
185439
|
-
cachedResults.set(
|
|
185439
|
+
cachedResults.set(key3, inherits);
|
|
185440
185440
|
return inherits;
|
|
185441
185441
|
}
|
|
185442
185442
|
function getReferencesForSuperKeyword(superKeyword) {
|
|
@@ -188391,8 +188391,8 @@ ${content}
|
|
|
188391
188391
|
currDiff[typeOrder] = (currDiff[typeOrder] ?? 0) + measureSortedness(importDecl, (n1, n2) => compareImportOrExportSpecifiers(n1, n2, curComparer, { organizeImportsTypeOrder: typeOrder }));
|
|
188392
188392
|
}
|
|
188393
188393
|
}
|
|
188394
|
-
for (const
|
|
188395
|
-
const typeOrder =
|
|
188394
|
+
for (const key3 of typesToTest) {
|
|
188395
|
+
const typeOrder = key3;
|
|
188396
188396
|
if (currDiff[typeOrder] < bestDiff[typeOrder]) {
|
|
188397
188397
|
bestDiff[typeOrder] = currDiff[typeOrder];
|
|
188398
188398
|
bestComparer[typeOrder] = curComparer;
|
|
@@ -198634,8 +198634,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198634
198634
|
function createOverload(name, overloads, binder2, deprecations) {
|
|
198635
198635
|
Object.defineProperty(call, "name", { ...Object.getOwnPropertyDescriptor(call, "name"), value: name });
|
|
198636
198636
|
if (deprecations) {
|
|
198637
|
-
for (const
|
|
198638
|
-
const index = +
|
|
198637
|
+
for (const key3 of Object.keys(deprecations)) {
|
|
198638
|
+
const index = +key3;
|
|
198639
198639
|
if (!isNaN(index) && hasProperty(overloads, `${index}`)) {
|
|
198640
198640
|
overloads[index] = deprecate(overloads[index], { ...deprecations[index], name });
|
|
198641
198641
|
}
|
|
@@ -198851,8 +198851,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198851
198851
|
break;
|
|
198852
198852
|
case "typesRegistry": {
|
|
198853
198853
|
const typesRegistry = {};
|
|
198854
|
-
this.typesRegistry.forEach((value,
|
|
198855
|
-
typesRegistry[
|
|
198854
|
+
this.typesRegistry.forEach((value, key3) => {
|
|
198855
|
+
typesRegistry[key3] = value;
|
|
198856
198856
|
});
|
|
198857
198857
|
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
198858
198858
|
this.sendResponse(response);
|
|
@@ -199003,11 +199003,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199003
199003
|
this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`);
|
|
199004
199004
|
}
|
|
199005
199005
|
if (npmConfig.devDependencies && (npmLock.packages || npmLock.dependencies)) {
|
|
199006
|
-
for (const
|
|
199007
|
-
if (npmLock.packages && !hasProperty(npmLock.packages, `node_modules/${
|
|
199006
|
+
for (const key3 in npmConfig.devDependencies) {
|
|
199007
|
+
if (npmLock.packages && !hasProperty(npmLock.packages, `node_modules/${key3}`) || npmLock.dependencies && !hasProperty(npmLock.dependencies, key3)) {
|
|
199008
199008
|
continue;
|
|
199009
199009
|
}
|
|
199010
|
-
const packageName = getBaseFileName(
|
|
199010
|
+
const packageName = getBaseFileName(key3);
|
|
199011
199011
|
if (!packageName) {
|
|
199012
199012
|
continue;
|
|
199013
199013
|
}
|
|
@@ -199028,7 +199028,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199028
199028
|
if (this.log.isEnabled()) {
|
|
199029
199029
|
this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`);
|
|
199030
199030
|
}
|
|
199031
|
-
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${
|
|
199031
|
+
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${key3}`) || getProperty(npmLock.dependencies, key3);
|
|
199032
199032
|
const version22 = info && info.version;
|
|
199033
199033
|
if (!version22) {
|
|
199034
199034
|
continue;
|
|
@@ -202982,9 +202982,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202982
202982
|
);
|
|
202983
202983
|
}
|
|
202984
202984
|
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) {
|
|
202985
|
-
const
|
|
202986
|
-
let id = pathToId.get(
|
|
202987
|
-
if (!id) pathToId.set(
|
|
202985
|
+
const key3 = service.toPath(path);
|
|
202986
|
+
let id = pathToId.get(key3);
|
|
202987
|
+
if (!id) pathToId.set(key3, id = ids++);
|
|
202988
202988
|
let callbacks = idToCallbacks.get(id);
|
|
202989
202989
|
if (!callbacks) {
|
|
202990
202990
|
idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set());
|
|
@@ -202997,7 +202997,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202997
202997
|
if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback))) return;
|
|
202998
202998
|
if (callbacks2.size) return;
|
|
202999
202999
|
idToCallbacks.delete(id);
|
|
203000
|
-
pathToId.delete(
|
|
203000
|
+
pathToId.delete(key3);
|
|
203001
203001
|
service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } });
|
|
203002
203002
|
}
|
|
203003
203003
|
};
|
|
@@ -203151,14 +203151,14 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203151
203151
|
return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
|
|
203152
203152
|
}
|
|
203153
203153
|
/** @internal */
|
|
203154
|
-
setDocument(
|
|
203154
|
+
setDocument(key3, path, sourceFile) {
|
|
203155
203155
|
const info = Debug.checkDefined(this.getScriptInfoForPath(path));
|
|
203156
|
-
info.cacheSourceFile = { key:
|
|
203156
|
+
info.cacheSourceFile = { key: key3, sourceFile };
|
|
203157
203157
|
}
|
|
203158
203158
|
/** @internal */
|
|
203159
|
-
getDocument(
|
|
203159
|
+
getDocument(key3, path) {
|
|
203160
203160
|
const info = this.getScriptInfoForPath(path);
|
|
203161
|
-
return info && info.cacheSourceFile && info.cacheSourceFile.key ===
|
|
203161
|
+
return info && info.cacheSourceFile && info.cacheSourceFile.key === key3 ? info.cacheSourceFile.sourceFile : void 0;
|
|
203162
203162
|
}
|
|
203163
203163
|
/** @internal */
|
|
203164
203164
|
ensureInferredProjectsUpToDate_TestOnly() {
|
|
@@ -203191,9 +203191,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203191
203191
|
raw.typesMap[k].match = new RegExp(raw.typesMap[k].match, "i");
|
|
203192
203192
|
}
|
|
203193
203193
|
this.safelist = raw.typesMap;
|
|
203194
|
-
for (const
|
|
203195
|
-
if (hasProperty(raw.simpleMap,
|
|
203196
|
-
this.legacySafelist.set(
|
|
203194
|
+
for (const key3 in raw.simpleMap) {
|
|
203195
|
+
if (hasProperty(raw.simpleMap, key3)) {
|
|
203196
|
+
this.legacySafelist.set(key3, raw.simpleMap[key3].toLowerCase());
|
|
203197
203197
|
}
|
|
203198
203198
|
}
|
|
203199
203199
|
} catch (e) {
|
|
@@ -205714,7 +205714,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205714
205714
|
/** @internal */
|
|
205715
205715
|
loadAncestorProjectTree(forProjects) {
|
|
205716
205716
|
forProjects ?? (forProjects = new Set(
|
|
205717
|
-
mapDefinedIterator(this.configuredProjects.entries(), ([
|
|
205717
|
+
mapDefinedIterator(this.configuredProjects.entries(), ([key3, project]) => !project.initialLoadPending ? key3 : void 0)
|
|
205718
205718
|
));
|
|
205719
205719
|
const seenProjects = /* @__PURE__ */ new Set();
|
|
205720
205720
|
const currentConfiguredProjects = arrayFrom(this.configuredProjects.values());
|
|
@@ -206486,7 +206486,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
206486
206486
|
let currentKey;
|
|
206487
206487
|
const result = {
|
|
206488
206488
|
get(fromFileName, toFileName2, preferences, options) {
|
|
206489
|
-
if (!cache || currentKey !==
|
|
206489
|
+
if (!cache || currentKey !== key3(fromFileName, preferences, options)) return void 0;
|
|
206490
206490
|
return cache.get(toFileName2);
|
|
206491
206491
|
},
|
|
206492
206492
|
set(fromFileName, toFileName2, preferences, options, kind, modulePaths, moduleSpecifiers2) {
|
|
@@ -206567,14 +206567,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
206567
206567
|
}
|
|
206568
206568
|
return result;
|
|
206569
206569
|
function ensureCache(fromFileName, preferences, options) {
|
|
206570
|
-
const newKey =
|
|
206570
|
+
const newKey = key3(fromFileName, preferences, options);
|
|
206571
206571
|
if (cache && currentKey !== newKey) {
|
|
206572
206572
|
result.clear();
|
|
206573
206573
|
}
|
|
206574
206574
|
currentKey = newKey;
|
|
206575
206575
|
return cache || (cache = /* @__PURE__ */ new Map());
|
|
206576
206576
|
}
|
|
206577
|
-
function
|
|
206577
|
+
function key3(fromFileName, preferences, options) {
|
|
206578
206578
|
return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;
|
|
206579
206579
|
}
|
|
206580
206580
|
function createInfo(kind, modulePaths, moduleSpecifiers2, packageName, isBlockedByPackageJsonDependencies) {
|
|
@@ -208234,11 +208234,11 @@ ${json2}${newLine}`;
|
|
|
208234
208234
|
"requestCompleted"
|
|
208235
208235
|
);
|
|
208236
208236
|
}
|
|
208237
|
-
addPerformanceData(
|
|
208237
|
+
addPerformanceData(key3, value) {
|
|
208238
208238
|
if (!this.performanceData) {
|
|
208239
208239
|
this.performanceData = {};
|
|
208240
208240
|
}
|
|
208241
|
-
this.performanceData[
|
|
208241
|
+
this.performanceData[key3] = (this.performanceData[key3] ?? 0) + value;
|
|
208242
208242
|
}
|
|
208243
208243
|
addDiagnosticsPerformanceData(file2, kind, duration3) {
|
|
208244
208244
|
var _a3, _b;
|
|
@@ -211648,11 +211648,11 @@ var require_visit = __commonJS({
|
|
|
211648
211648
|
visit.BREAK = BREAK;
|
|
211649
211649
|
visit.SKIP = SKIP;
|
|
211650
211650
|
visit.REMOVE = REMOVE;
|
|
211651
|
-
function visit_(
|
|
211652
|
-
const ctrl = callVisitor(
|
|
211651
|
+
function visit_(key3, node, visitor, path) {
|
|
211652
|
+
const ctrl = callVisitor(key3, node, visitor, path);
|
|
211653
211653
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
211654
|
-
replaceNode(
|
|
211655
|
-
return visit_(
|
|
211654
|
+
replaceNode(key3, path, ctrl);
|
|
211655
|
+
return visit_(key3, ctrl, visitor, path);
|
|
211656
211656
|
}
|
|
211657
211657
|
if (typeof ctrl !== "symbol") {
|
|
211658
211658
|
if (identity.isCollection(node)) {
|
|
@@ -211696,11 +211696,11 @@ var require_visit = __commonJS({
|
|
|
211696
211696
|
visitAsync.BREAK = BREAK;
|
|
211697
211697
|
visitAsync.SKIP = SKIP;
|
|
211698
211698
|
visitAsync.REMOVE = REMOVE;
|
|
211699
|
-
async function visitAsync_(
|
|
211700
|
-
const ctrl = await callVisitor(
|
|
211699
|
+
async function visitAsync_(key3, node, visitor, path) {
|
|
211700
|
+
const ctrl = await callVisitor(key3, node, visitor, path);
|
|
211701
211701
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
211702
|
-
replaceNode(
|
|
211703
|
-
return visitAsync_(
|
|
211702
|
+
replaceNode(key3, path, ctrl);
|
|
211703
|
+
return visitAsync_(key3, ctrl, visitor, path);
|
|
211704
211704
|
}
|
|
211705
211705
|
if (typeof ctrl !== "symbol") {
|
|
211706
211706
|
if (identity.isCollection(node)) {
|
|
@@ -211750,27 +211750,27 @@ var require_visit = __commonJS({
|
|
|
211750
211750
|
}
|
|
211751
211751
|
return visitor;
|
|
211752
211752
|
}
|
|
211753
|
-
function callVisitor(
|
|
211753
|
+
function callVisitor(key3, node, visitor, path) {
|
|
211754
211754
|
if (typeof visitor === "function")
|
|
211755
|
-
return visitor(
|
|
211755
|
+
return visitor(key3, node, path);
|
|
211756
211756
|
if (identity.isMap(node))
|
|
211757
|
-
return visitor.Map?.(
|
|
211757
|
+
return visitor.Map?.(key3, node, path);
|
|
211758
211758
|
if (identity.isSeq(node))
|
|
211759
|
-
return visitor.Seq?.(
|
|
211759
|
+
return visitor.Seq?.(key3, node, path);
|
|
211760
211760
|
if (identity.isPair(node))
|
|
211761
|
-
return visitor.Pair?.(
|
|
211761
|
+
return visitor.Pair?.(key3, node, path);
|
|
211762
211762
|
if (identity.isScalar(node))
|
|
211763
|
-
return visitor.Scalar?.(
|
|
211763
|
+
return visitor.Scalar?.(key3, node, path);
|
|
211764
211764
|
if (identity.isAlias(node))
|
|
211765
|
-
return visitor.Alias?.(
|
|
211765
|
+
return visitor.Alias?.(key3, node, path);
|
|
211766
211766
|
return void 0;
|
|
211767
211767
|
}
|
|
211768
|
-
function replaceNode(
|
|
211768
|
+
function replaceNode(key3, path, node) {
|
|
211769
211769
|
const parent = path[path.length - 1];
|
|
211770
211770
|
if (identity.isCollection(parent)) {
|
|
211771
|
-
parent.items[
|
|
211771
|
+
parent.items[key3] = node;
|
|
211772
211772
|
} else if (identity.isPair(parent)) {
|
|
211773
|
-
if (
|
|
211773
|
+
if (key3 === "key")
|
|
211774
211774
|
parent.key = node;
|
|
211775
211775
|
else
|
|
211776
211776
|
parent.value = node;
|
|
@@ -212031,7 +212031,7 @@ var require_anchors = __commonJS({
|
|
|
212031
212031
|
var require_applyReviver = __commonJS({
|
|
212032
212032
|
"node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
212033
212033
|
"use strict";
|
|
212034
|
-
function applyReviver(reviver, obj,
|
|
212034
|
+
function applyReviver(reviver, obj, key3, val) {
|
|
212035
212035
|
if (val && typeof val === "object") {
|
|
212036
212036
|
if (Array.isArray(val)) {
|
|
212037
212037
|
for (let i = 0, len = val.length; i < len; ++i) {
|
|
@@ -212071,7 +212071,7 @@ var require_applyReviver = __commonJS({
|
|
|
212071
212071
|
}
|
|
212072
212072
|
}
|
|
212073
212073
|
}
|
|
212074
|
-
return reviver.call(obj,
|
|
212074
|
+
return reviver.call(obj, key3, val);
|
|
212075
212075
|
}
|
|
212076
212076
|
exports.applyReviver = applyReviver;
|
|
212077
212077
|
}
|
|
@@ -212432,14 +212432,14 @@ var require_Collection = __commonJS({
|
|
|
212432
212432
|
if (isEmptyPath(path))
|
|
212433
212433
|
this.add(value);
|
|
212434
212434
|
else {
|
|
212435
|
-
const [
|
|
212436
|
-
const node = this.get(
|
|
212435
|
+
const [key3, ...rest] = path;
|
|
212436
|
+
const node = this.get(key3, true);
|
|
212437
212437
|
if (identity.isCollection(node))
|
|
212438
212438
|
node.addIn(rest, value);
|
|
212439
212439
|
else if (node === void 0 && this.schema)
|
|
212440
|
-
this.set(
|
|
212440
|
+
this.set(key3, collectionFromPath(this.schema, rest, value));
|
|
212441
212441
|
else
|
|
212442
|
-
throw new Error(`Expected YAML collection at ${
|
|
212442
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
212443
212443
|
}
|
|
212444
212444
|
}
|
|
212445
212445
|
/**
|
|
@@ -212447,14 +212447,14 @@ var require_Collection = __commonJS({
|
|
|
212447
212447
|
* @returns `true` if the item was found and removed.
|
|
212448
212448
|
*/
|
|
212449
212449
|
deleteIn(path) {
|
|
212450
|
-
const [
|
|
212450
|
+
const [key3, ...rest] = path;
|
|
212451
212451
|
if (rest.length === 0)
|
|
212452
|
-
return this.delete(
|
|
212453
|
-
const node = this.get(
|
|
212452
|
+
return this.delete(key3);
|
|
212453
|
+
const node = this.get(key3, true);
|
|
212454
212454
|
if (identity.isCollection(node))
|
|
212455
212455
|
return node.deleteIn(rest);
|
|
212456
212456
|
else
|
|
212457
|
-
throw new Error(`Expected YAML collection at ${
|
|
212457
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
212458
212458
|
}
|
|
212459
212459
|
/**
|
|
212460
212460
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -212462,8 +212462,8 @@ var require_Collection = __commonJS({
|
|
|
212462
212462
|
* `true` (collections are always returned intact).
|
|
212463
212463
|
*/
|
|
212464
212464
|
getIn(path, keepScalar) {
|
|
212465
|
-
const [
|
|
212466
|
-
const node = this.get(
|
|
212465
|
+
const [key3, ...rest] = path;
|
|
212466
|
+
const node = this.get(key3, true);
|
|
212467
212467
|
if (rest.length === 0)
|
|
212468
212468
|
return !keepScalar && identity.isScalar(node) ? node.value : node;
|
|
212469
212469
|
else
|
|
@@ -212481,10 +212481,10 @@ var require_Collection = __commonJS({
|
|
|
212481
212481
|
* Checks if the collection includes a value with the key `key`.
|
|
212482
212482
|
*/
|
|
212483
212483
|
hasIn(path) {
|
|
212484
|
-
const [
|
|
212484
|
+
const [key3, ...rest] = path;
|
|
212485
212485
|
if (rest.length === 0)
|
|
212486
|
-
return this.has(
|
|
212487
|
-
const node = this.get(
|
|
212486
|
+
return this.has(key3);
|
|
212487
|
+
const node = this.get(key3, true);
|
|
212488
212488
|
return identity.isCollection(node) ? node.hasIn(rest) : false;
|
|
212489
212489
|
}
|
|
212490
212490
|
/**
|
|
@@ -212492,17 +212492,17 @@ var require_Collection = __commonJS({
|
|
|
212492
212492
|
* boolean to add/remove the item from the set.
|
|
212493
212493
|
*/
|
|
212494
212494
|
setIn(path, value) {
|
|
212495
|
-
const [
|
|
212495
|
+
const [key3, ...rest] = path;
|
|
212496
212496
|
if (rest.length === 0) {
|
|
212497
|
-
this.set(
|
|
212497
|
+
this.set(key3, value);
|
|
212498
212498
|
} else {
|
|
212499
|
-
const node = this.get(
|
|
212499
|
+
const node = this.get(key3, true);
|
|
212500
212500
|
if (identity.isCollection(node))
|
|
212501
212501
|
node.setIn(rest, value);
|
|
212502
212502
|
else if (node === void 0 && this.schema)
|
|
212503
|
-
this.set(
|
|
212503
|
+
this.set(key3, collectionFromPath(this.schema, rest, value));
|
|
212504
212504
|
else
|
|
212505
|
-
throw new Error(`Expected YAML collection at ${
|
|
212505
|
+
throw new Error(`Expected YAML collection at ${key3}. Remaining path: ${rest}`);
|
|
212506
212506
|
}
|
|
212507
212507
|
}
|
|
212508
212508
|
};
|
|
@@ -213080,19 +213080,19 @@ var require_stringifyPair = __commonJS({
|
|
|
213080
213080
|
var Scalar = require_Scalar();
|
|
213081
213081
|
var stringify = require_stringify();
|
|
213082
213082
|
var stringifyComment = require_stringifyComment();
|
|
213083
|
-
function stringifyPair({ key:
|
|
213083
|
+
function stringifyPair({ key: key3, value }, ctx, onComment, onChompKeep) {
|
|
213084
213084
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
213085
|
-
let keyComment = identity.isNode(
|
|
213085
|
+
let keyComment = identity.isNode(key3) && key3.comment || null;
|
|
213086
213086
|
if (simpleKeys) {
|
|
213087
213087
|
if (keyComment) {
|
|
213088
213088
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
213089
213089
|
}
|
|
213090
|
-
if (identity.isCollection(
|
|
213090
|
+
if (identity.isCollection(key3) || !identity.isNode(key3) && typeof key3 === "object") {
|
|
213091
213091
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
213092
213092
|
throw new Error(msg);
|
|
213093
213093
|
}
|
|
213094
213094
|
}
|
|
213095
|
-
let explicitKey = !simpleKeys && (!
|
|
213095
|
+
let explicitKey = !simpleKeys && (!key3 || keyComment && value == null && !ctx.inFlow || identity.isCollection(key3) || (identity.isScalar(key3) ? key3.type === Scalar.Scalar.BLOCK_FOLDED || key3.type === Scalar.Scalar.BLOCK_LITERAL : typeof key3 === "object"));
|
|
213096
213096
|
ctx = Object.assign({}, ctx, {
|
|
213097
213097
|
allNullValues: false,
|
|
213098
213098
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -213100,7 +213100,7 @@ var require_stringifyPair = __commonJS({
|
|
|
213100
213100
|
});
|
|
213101
213101
|
let keyCommentDone = false;
|
|
213102
213102
|
let chompKeep = false;
|
|
213103
|
-
let str = stringify.stringify(
|
|
213103
|
+
let str = stringify.stringify(key3, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
213104
213104
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
213105
213105
|
if (simpleKeys)
|
|
213106
213106
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -213244,7 +213244,7 @@ var require_merge = __commonJS({
|
|
|
213244
213244
|
}),
|
|
213245
213245
|
stringify: () => MERGE_KEY
|
|
213246
213246
|
};
|
|
213247
|
-
var isMergeKey = (ctx,
|
|
213247
|
+
var isMergeKey = (ctx, key3) => (merge2.identify(key3) || identity.isScalar(key3) && (!key3.type || key3.type === Scalar.Scalar.PLAIN) && merge2.identify(key3.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
213248
213248
|
function addMergeToJSMap(ctx, map2, value) {
|
|
213249
213249
|
const source = resolveAliasValue(ctx, value);
|
|
213250
213250
|
if (identity.isSeq(source))
|
|
@@ -213261,14 +213261,14 @@ var require_merge = __commonJS({
|
|
|
213261
213261
|
if (!identity.isMap(source))
|
|
213262
213262
|
throw new Error("Merge sources must be maps or map aliases");
|
|
213263
213263
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
213264
|
-
for (const [
|
|
213264
|
+
for (const [key3, value2] of srcMap) {
|
|
213265
213265
|
if (map2 instanceof Map) {
|
|
213266
|
-
if (!map2.has(
|
|
213267
|
-
map2.set(
|
|
213266
|
+
if (!map2.has(key3))
|
|
213267
|
+
map2.set(key3, value2);
|
|
213268
213268
|
} else if (map2 instanceof Set) {
|
|
213269
|
-
map2.add(
|
|
213270
|
-
} else if (!Object.prototype.hasOwnProperty.call(map2,
|
|
213271
|
-
Object.defineProperty(map2,
|
|
213269
|
+
map2.add(key3);
|
|
213270
|
+
} else if (!Object.prototype.hasOwnProperty.call(map2, key3)) {
|
|
213271
|
+
Object.defineProperty(map2, key3, {
|
|
213272
213272
|
value: value2,
|
|
213273
213273
|
writable: true,
|
|
213274
213274
|
enumerable: true,
|
|
@@ -213296,19 +213296,19 @@ var require_addPairToJSMap = __commonJS({
|
|
|
213296
213296
|
var stringify = require_stringify();
|
|
213297
213297
|
var identity = require_identity();
|
|
213298
213298
|
var toJS = require_toJS();
|
|
213299
|
-
function addPairToJSMap(ctx, map2, { key:
|
|
213300
|
-
if (identity.isNode(
|
|
213301
|
-
|
|
213302
|
-
else if (merge2.isMergeKey(ctx,
|
|
213299
|
+
function addPairToJSMap(ctx, map2, { key: key3, value }) {
|
|
213300
|
+
if (identity.isNode(key3) && key3.addToJSMap)
|
|
213301
|
+
key3.addToJSMap(ctx, map2, value);
|
|
213302
|
+
else if (merge2.isMergeKey(ctx, key3))
|
|
213303
213303
|
merge2.addMergeToJSMap(ctx, map2, value);
|
|
213304
213304
|
else {
|
|
213305
|
-
const jsKey = toJS.toJS(
|
|
213305
|
+
const jsKey = toJS.toJS(key3, "", ctx);
|
|
213306
213306
|
if (map2 instanceof Map) {
|
|
213307
213307
|
map2.set(jsKey, toJS.toJS(value, jsKey, ctx));
|
|
213308
213308
|
} else if (map2 instanceof Set) {
|
|
213309
213309
|
map2.add(jsKey);
|
|
213310
213310
|
} else {
|
|
213311
|
-
const stringKey = stringifyKey(
|
|
213311
|
+
const stringKey = stringifyKey(key3, jsKey, ctx);
|
|
213312
213312
|
const jsValue = toJS.toJS(value, stringKey, ctx);
|
|
213313
213313
|
if (stringKey in map2)
|
|
213314
213314
|
Object.defineProperty(map2, stringKey, {
|
|
@@ -213323,19 +213323,19 @@ var require_addPairToJSMap = __commonJS({
|
|
|
213323
213323
|
}
|
|
213324
213324
|
return map2;
|
|
213325
213325
|
}
|
|
213326
|
-
function stringifyKey(
|
|
213326
|
+
function stringifyKey(key3, jsKey, ctx) {
|
|
213327
213327
|
if (jsKey === null)
|
|
213328
213328
|
return "";
|
|
213329
213329
|
if (typeof jsKey !== "object")
|
|
213330
213330
|
return String(jsKey);
|
|
213331
|
-
if (identity.isNode(
|
|
213331
|
+
if (identity.isNode(key3) && ctx?.doc) {
|
|
213332
213332
|
const strCtx = stringify.createStringifyContext(ctx.doc, {});
|
|
213333
213333
|
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
213334
213334
|
for (const node of ctx.anchors.keys())
|
|
213335
213335
|
strCtx.anchors.add(node.anchor);
|
|
213336
213336
|
strCtx.inFlow = true;
|
|
213337
213337
|
strCtx.inStringifyKey = true;
|
|
213338
|
-
const strKey =
|
|
213338
|
+
const strKey = key3.toString(strCtx);
|
|
213339
213339
|
if (!ctx.mapKeyWarned) {
|
|
213340
213340
|
let jsonStr = JSON.stringify(strKey);
|
|
213341
213341
|
if (jsonStr.length > 40)
|
|
@@ -213359,24 +213359,24 @@ var require_Pair = __commonJS({
|
|
|
213359
213359
|
var stringifyPair = require_stringifyPair();
|
|
213360
213360
|
var addPairToJSMap = require_addPairToJSMap();
|
|
213361
213361
|
var identity = require_identity();
|
|
213362
|
-
function createPair(
|
|
213363
|
-
const k = createNode.createNode(
|
|
213362
|
+
function createPair(key3, value, ctx) {
|
|
213363
|
+
const k = createNode.createNode(key3, void 0, ctx);
|
|
213364
213364
|
const v = createNode.createNode(value, void 0, ctx);
|
|
213365
213365
|
return new Pair(k, v);
|
|
213366
213366
|
}
|
|
213367
213367
|
var Pair = class _Pair {
|
|
213368
|
-
constructor(
|
|
213368
|
+
constructor(key3, value = null) {
|
|
213369
213369
|
Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
|
|
213370
|
-
this.key =
|
|
213370
|
+
this.key = key3;
|
|
213371
213371
|
this.value = value;
|
|
213372
213372
|
}
|
|
213373
213373
|
clone(schema) {
|
|
213374
|
-
let { key:
|
|
213375
|
-
if (identity.isNode(
|
|
213376
|
-
|
|
213374
|
+
let { key: key3, value } = this;
|
|
213375
|
+
if (identity.isNode(key3))
|
|
213376
|
+
key3 = key3.clone(schema);
|
|
213377
213377
|
if (identity.isNode(value))
|
|
213378
213378
|
value = value.clone(schema);
|
|
213379
|
-
return new _Pair(
|
|
213379
|
+
return new _Pair(key3, value);
|
|
213380
213380
|
}
|
|
213381
213381
|
toJSON(_, ctx) {
|
|
213382
213382
|
const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
@@ -213552,11 +213552,11 @@ var require_YAMLMap = __commonJS({
|
|
|
213552
213552
|
var identity = require_identity();
|
|
213553
213553
|
var Pair = require_Pair();
|
|
213554
213554
|
var Scalar = require_Scalar();
|
|
213555
|
-
function findPair(items,
|
|
213556
|
-
const k = identity.isScalar(
|
|
213555
|
+
function findPair(items, key3) {
|
|
213556
|
+
const k = identity.isScalar(key3) ? key3.value : key3;
|
|
213557
213557
|
for (const it of items) {
|
|
213558
213558
|
if (identity.isPair(it)) {
|
|
213559
|
-
if (it.key ===
|
|
213559
|
+
if (it.key === key3 || it.key === k)
|
|
213560
213560
|
return it;
|
|
213561
213561
|
if (identity.isScalar(it.key) && it.key.value === k)
|
|
213562
213562
|
return it;
|
|
@@ -213579,20 +213579,20 @@ var require_YAMLMap = __commonJS({
|
|
|
213579
213579
|
static from(schema, obj, ctx) {
|
|
213580
213580
|
const { keepUndefined, replacer } = ctx;
|
|
213581
213581
|
const map2 = new this(schema);
|
|
213582
|
-
const add = (
|
|
213582
|
+
const add = (key3, value) => {
|
|
213583
213583
|
if (typeof replacer === "function")
|
|
213584
|
-
value = replacer.call(obj,
|
|
213585
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
|
213584
|
+
value = replacer.call(obj, key3, value);
|
|
213585
|
+
else if (Array.isArray(replacer) && !replacer.includes(key3))
|
|
213586
213586
|
return;
|
|
213587
213587
|
if (value !== void 0 || keepUndefined)
|
|
213588
|
-
map2.items.push(Pair.createPair(
|
|
213588
|
+
map2.items.push(Pair.createPair(key3, value, ctx));
|
|
213589
213589
|
};
|
|
213590
213590
|
if (obj instanceof Map) {
|
|
213591
|
-
for (const [
|
|
213592
|
-
add(
|
|
213591
|
+
for (const [key3, value] of obj)
|
|
213592
|
+
add(key3, value);
|
|
213593
213593
|
} else if (obj && typeof obj === "object") {
|
|
213594
|
-
for (const
|
|
213595
|
-
add(
|
|
213594
|
+
for (const key3 of Object.keys(obj))
|
|
213595
|
+
add(key3, obj[key3]);
|
|
213596
213596
|
}
|
|
213597
213597
|
if (typeof schema.sortMapEntries === "function") {
|
|
213598
213598
|
map2.items.sort(schema.sortMapEntries);
|
|
@@ -213632,23 +213632,23 @@ var require_YAMLMap = __commonJS({
|
|
|
213632
213632
|
this.items.push(_pair);
|
|
213633
213633
|
}
|
|
213634
213634
|
}
|
|
213635
|
-
delete(
|
|
213636
|
-
const it = findPair(this.items,
|
|
213635
|
+
delete(key3) {
|
|
213636
|
+
const it = findPair(this.items, key3);
|
|
213637
213637
|
if (!it)
|
|
213638
213638
|
return false;
|
|
213639
213639
|
const del = this.items.splice(this.items.indexOf(it), 1);
|
|
213640
213640
|
return del.length > 0;
|
|
213641
213641
|
}
|
|
213642
|
-
get(
|
|
213643
|
-
const it = findPair(this.items,
|
|
213642
|
+
get(key3, keepScalar) {
|
|
213643
|
+
const it = findPair(this.items, key3);
|
|
213644
213644
|
const node = it?.value;
|
|
213645
213645
|
return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0;
|
|
213646
213646
|
}
|
|
213647
|
-
has(
|
|
213648
|
-
return !!findPair(this.items,
|
|
213647
|
+
has(key3) {
|
|
213648
|
+
return !!findPair(this.items, key3);
|
|
213649
213649
|
}
|
|
213650
|
-
set(
|
|
213651
|
-
this.add(new Pair.Pair(
|
|
213650
|
+
set(key3, value) {
|
|
213651
|
+
this.add(new Pair.Pair(key3, value), true);
|
|
213652
213652
|
}
|
|
213653
213653
|
/**
|
|
213654
213654
|
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
@@ -213737,15 +213737,15 @@ var require_YAMLSeq = __commonJS({
|
|
|
213737
213737
|
*
|
|
213738
213738
|
* @returns `true` if the item was found and removed.
|
|
213739
213739
|
*/
|
|
213740
|
-
delete(
|
|
213741
|
-
const idx = asItemIndex(
|
|
213740
|
+
delete(key3) {
|
|
213741
|
+
const idx = asItemIndex(key3);
|
|
213742
213742
|
if (typeof idx !== "number")
|
|
213743
213743
|
return false;
|
|
213744
213744
|
const del = this.items.splice(idx, 1);
|
|
213745
213745
|
return del.length > 0;
|
|
213746
213746
|
}
|
|
213747
|
-
get(
|
|
213748
|
-
const idx = asItemIndex(
|
|
213747
|
+
get(key3, keepScalar) {
|
|
213748
|
+
const idx = asItemIndex(key3);
|
|
213749
213749
|
if (typeof idx !== "number")
|
|
213750
213750
|
return void 0;
|
|
213751
213751
|
const it = this.items[idx];
|
|
@@ -213757,8 +213757,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213757
213757
|
* `key` must contain a representation of an integer for this to succeed.
|
|
213758
213758
|
* It may be wrapped in a `Scalar`.
|
|
213759
213759
|
*/
|
|
213760
|
-
has(
|
|
213761
|
-
const idx = asItemIndex(
|
|
213760
|
+
has(key3) {
|
|
213761
|
+
const idx = asItemIndex(key3);
|
|
213762
213762
|
return typeof idx === "number" && idx < this.items.length;
|
|
213763
213763
|
}
|
|
213764
213764
|
/**
|
|
@@ -213768,10 +213768,10 @@ var require_YAMLSeq = __commonJS({
|
|
|
213768
213768
|
* If `key` does not contain a representation of an integer, this will throw.
|
|
213769
213769
|
* It may be wrapped in a `Scalar`.
|
|
213770
213770
|
*/
|
|
213771
|
-
set(
|
|
213772
|
-
const idx = asItemIndex(
|
|
213771
|
+
set(key3, value) {
|
|
213772
|
+
const idx = asItemIndex(key3);
|
|
213773
213773
|
if (typeof idx !== "number")
|
|
213774
|
-
throw new Error(`Expected a valid index, not ${
|
|
213774
|
+
throw new Error(`Expected a valid index, not ${key3}.`);
|
|
213775
213775
|
const prev = this.items[idx];
|
|
213776
213776
|
if (identity.isScalar(prev) && Scalar.isScalarValue(value))
|
|
213777
213777
|
prev.value = value;
|
|
@@ -213805,8 +213805,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213805
213805
|
let i = 0;
|
|
213806
213806
|
for (let it of obj) {
|
|
213807
213807
|
if (typeof replacer === "function") {
|
|
213808
|
-
const
|
|
213809
|
-
it = replacer.call(obj,
|
|
213808
|
+
const key3 = obj instanceof Set ? it : String(i++);
|
|
213809
|
+
it = replacer.call(obj, key3, it);
|
|
213810
213810
|
}
|
|
213811
213811
|
seq.items.push(createNode.createNode(it, void 0, ctx));
|
|
213812
213812
|
}
|
|
@@ -213814,8 +213814,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213814
213814
|
return seq;
|
|
213815
213815
|
}
|
|
213816
213816
|
};
|
|
213817
|
-
function asItemIndex(
|
|
213818
|
-
let idx = identity.isScalar(
|
|
213817
|
+
function asItemIndex(key3) {
|
|
213818
|
+
let idx = identity.isScalar(key3) ? key3.value : key3;
|
|
213819
213819
|
if (idx && typeof idx === "string")
|
|
213820
213820
|
idx = Number(idx);
|
|
213821
213821
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -214229,25 +214229,25 @@ ${cn.comment}` : item.comment;
|
|
|
214229
214229
|
for (let it of iterable) {
|
|
214230
214230
|
if (typeof replacer === "function")
|
|
214231
214231
|
it = replacer.call(iterable, String(i++), it);
|
|
214232
|
-
let
|
|
214232
|
+
let key3, value;
|
|
214233
214233
|
if (Array.isArray(it)) {
|
|
214234
214234
|
if (it.length === 2) {
|
|
214235
|
-
|
|
214235
|
+
key3 = it[0];
|
|
214236
214236
|
value = it[1];
|
|
214237
214237
|
} else
|
|
214238
214238
|
throw new TypeError(`Expected [key, value] tuple: ${it}`);
|
|
214239
214239
|
} else if (it && it instanceof Object) {
|
|
214240
214240
|
const keys = Object.keys(it);
|
|
214241
214241
|
if (keys.length === 1) {
|
|
214242
|
-
|
|
214243
|
-
value = it[
|
|
214242
|
+
key3 = keys[0];
|
|
214243
|
+
value = it[key3];
|
|
214244
214244
|
} else {
|
|
214245
214245
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
214246
214246
|
}
|
|
214247
214247
|
} else {
|
|
214248
|
-
|
|
214248
|
+
key3 = it;
|
|
214249
214249
|
}
|
|
214250
|
-
pairs2.items.push(Pair.createPair(
|
|
214250
|
+
pairs2.items.push(Pair.createPair(key3, value, ctx));
|
|
214251
214251
|
}
|
|
214252
214252
|
return pairs2;
|
|
214253
214253
|
}
|
|
@@ -214294,16 +214294,16 @@ var require_omap = __commonJS({
|
|
|
214294
214294
|
if (ctx?.onCreate)
|
|
214295
214295
|
ctx.onCreate(map2);
|
|
214296
214296
|
for (const pair of this.items) {
|
|
214297
|
-
let
|
|
214297
|
+
let key3, value;
|
|
214298
214298
|
if (identity.isPair(pair)) {
|
|
214299
|
-
|
|
214300
|
-
value = toJS.toJS(pair.value,
|
|
214299
|
+
key3 = toJS.toJS(pair.key, "", ctx);
|
|
214300
|
+
value = toJS.toJS(pair.value, key3, ctx);
|
|
214301
214301
|
} else {
|
|
214302
|
-
|
|
214302
|
+
key3 = toJS.toJS(pair, "", ctx);
|
|
214303
214303
|
}
|
|
214304
|
-
if (map2.has(
|
|
214304
|
+
if (map2.has(key3))
|
|
214305
214305
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
214306
|
-
map2.set(
|
|
214306
|
+
map2.set(key3, value);
|
|
214307
214307
|
}
|
|
214308
214308
|
return map2;
|
|
214309
214309
|
}
|
|
@@ -214324,12 +214324,12 @@ var require_omap = __commonJS({
|
|
|
214324
214324
|
resolve(seq, onError) {
|
|
214325
214325
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
214326
214326
|
const seenKeys = [];
|
|
214327
|
-
for (const { key:
|
|
214328
|
-
if (identity.isScalar(
|
|
214329
|
-
if (seenKeys.includes(
|
|
214330
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
|
214327
|
+
for (const { key: key3 } of pairs$1.items) {
|
|
214328
|
+
if (identity.isScalar(key3)) {
|
|
214329
|
+
if (seenKeys.includes(key3.value)) {
|
|
214330
|
+
onError(`Ordered maps must not include duplicate keys: ${key3.value}`);
|
|
214331
214331
|
} else {
|
|
214332
|
-
seenKeys.push(
|
|
214332
|
+
seenKeys.push(key3.value);
|
|
214333
214333
|
}
|
|
214334
214334
|
}
|
|
214335
214335
|
}
|
|
@@ -214514,14 +214514,14 @@ var require_set = __commonJS({
|
|
|
214514
214514
|
super(schema);
|
|
214515
214515
|
this.tag = _YAMLSet.tag;
|
|
214516
214516
|
}
|
|
214517
|
-
add(
|
|
214517
|
+
add(key3) {
|
|
214518
214518
|
let pair;
|
|
214519
|
-
if (identity.isPair(
|
|
214520
|
-
pair =
|
|
214521
|
-
else if (
|
|
214522
|
-
pair = new Pair.Pair(
|
|
214519
|
+
if (identity.isPair(key3))
|
|
214520
|
+
pair = key3;
|
|
214521
|
+
else if (key3 && typeof key3 === "object" && "key" in key3 && "value" in key3 && key3.value === null)
|
|
214522
|
+
pair = new Pair.Pair(key3.key, null);
|
|
214523
214523
|
else
|
|
214524
|
-
pair = new Pair.Pair(
|
|
214524
|
+
pair = new Pair.Pair(key3, null);
|
|
214525
214525
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
|
214526
214526
|
if (!prev)
|
|
214527
214527
|
this.items.push(pair);
|
|
@@ -214530,18 +214530,18 @@ var require_set = __commonJS({
|
|
|
214530
214530
|
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
214531
214531
|
* Otherwise, returns the value of that Pair's key.
|
|
214532
214532
|
*/
|
|
214533
|
-
get(
|
|
214534
|
-
const pair = YAMLMap.findPair(this.items,
|
|
214533
|
+
get(key3, keepPair) {
|
|
214534
|
+
const pair = YAMLMap.findPair(this.items, key3);
|
|
214535
214535
|
return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
214536
214536
|
}
|
|
214537
|
-
set(
|
|
214537
|
+
set(key3, value) {
|
|
214538
214538
|
if (typeof value !== "boolean")
|
|
214539
214539
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
|
|
214540
|
-
const prev = YAMLMap.findPair(this.items,
|
|
214540
|
+
const prev = YAMLMap.findPair(this.items, key3);
|
|
214541
214541
|
if (prev && !value) {
|
|
214542
214542
|
this.items.splice(this.items.indexOf(prev), 1);
|
|
214543
214543
|
} else if (!prev && value) {
|
|
214544
|
-
this.items.push(new Pair.Pair(
|
|
214544
|
+
this.items.push(new Pair.Pair(key3));
|
|
214545
214545
|
}
|
|
214546
214546
|
}
|
|
214547
214547
|
toJSON(_, ctx) {
|
|
@@ -214788,7 +214788,7 @@ var require_tags = __commonJS({
|
|
|
214788
214788
|
if (Array.isArray(customTags))
|
|
214789
214789
|
tags = [];
|
|
214790
214790
|
else {
|
|
214791
|
-
const keys = Array.from(schemas.keys()).filter((
|
|
214791
|
+
const keys = Array.from(schemas.keys()).filter((key3) => key3 !== "yaml11").map((key3) => JSON.stringify(key3)).join(", ");
|
|
214792
214792
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
|
214793
214793
|
}
|
|
214794
214794
|
}
|
|
@@ -214804,7 +214804,7 @@ var require_tags = __commonJS({
|
|
|
214804
214804
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
214805
214805
|
if (!tagObj) {
|
|
214806
214806
|
const tagName = JSON.stringify(tag);
|
|
214807
|
-
const keys = Object.keys(tagsByName).map((
|
|
214807
|
+
const keys = Object.keys(tagsByName).map((key3) => JSON.stringify(key3)).join(", ");
|
|
214808
214808
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
214809
214809
|
}
|
|
214810
214810
|
if (!tags2.includes(tagObj))
|
|
@@ -215068,8 +215068,8 @@ var require_Document = __commonJS({
|
|
|
215068
215068
|
* Convert a key and a value into a `Pair` using the current schema,
|
|
215069
215069
|
* recursively wrapping all values as `Scalar` or `Collection` nodes.
|
|
215070
215070
|
*/
|
|
215071
|
-
createPair(
|
|
215072
|
-
const k = this.createNode(
|
|
215071
|
+
createPair(key3, value, options = {}) {
|
|
215072
|
+
const k = this.createNode(key3, null, options);
|
|
215073
215073
|
const v = this.createNode(value, null, options);
|
|
215074
215074
|
return new Pair.Pair(k, v);
|
|
215075
215075
|
}
|
|
@@ -215077,8 +215077,8 @@ var require_Document = __commonJS({
|
|
|
215077
215077
|
* Removes a value from the document.
|
|
215078
215078
|
* @returns `true` if the item was found and removed.
|
|
215079
215079
|
*/
|
|
215080
|
-
delete(
|
|
215081
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
|
215080
|
+
delete(key3) {
|
|
215081
|
+
return assertCollection(this.contents) ? this.contents.delete(key3) : false;
|
|
215082
215082
|
}
|
|
215083
215083
|
/**
|
|
215084
215084
|
* Removes a value from the document.
|
|
@@ -215098,8 +215098,8 @@ var require_Document = __commonJS({
|
|
|
215098
215098
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
215099
215099
|
* `true` (collections are always returned intact).
|
|
215100
215100
|
*/
|
|
215101
|
-
get(
|
|
215102
|
-
return identity.isCollection(this.contents) ? this.contents.get(
|
|
215101
|
+
get(key3, keepScalar) {
|
|
215102
|
+
return identity.isCollection(this.contents) ? this.contents.get(key3, keepScalar) : void 0;
|
|
215103
215103
|
}
|
|
215104
215104
|
/**
|
|
215105
215105
|
* Returns item at `path`, or `undefined` if not found. By default unwraps
|
|
@@ -215114,8 +215114,8 @@ var require_Document = __commonJS({
|
|
|
215114
215114
|
/**
|
|
215115
215115
|
* Checks if the document includes a value with the key `key`.
|
|
215116
215116
|
*/
|
|
215117
|
-
has(
|
|
215118
|
-
return identity.isCollection(this.contents) ? this.contents.has(
|
|
215117
|
+
has(key3) {
|
|
215118
|
+
return identity.isCollection(this.contents) ? this.contents.has(key3) : false;
|
|
215119
215119
|
}
|
|
215120
215120
|
/**
|
|
215121
215121
|
* Checks if the document includes a value at `path`.
|
|
@@ -215129,11 +215129,11 @@ var require_Document = __commonJS({
|
|
|
215129
215129
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
215130
215130
|
* boolean to add/remove the item from the set.
|
|
215131
215131
|
*/
|
|
215132
|
-
set(
|
|
215132
|
+
set(key3, value) {
|
|
215133
215133
|
if (this.contents == null) {
|
|
215134
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
215134
|
+
this.contents = Collection.collectionFromPath(this.schema, [key3], value);
|
|
215135
215135
|
} else if (assertCollection(this.contents)) {
|
|
215136
|
-
this.contents.set(
|
|
215136
|
+
this.contents.set(key3, value);
|
|
215137
215137
|
}
|
|
215138
215138
|
}
|
|
215139
215139
|
/**
|
|
@@ -215441,24 +215441,24 @@ var require_resolve_props = __commonJS({
|
|
|
215441
215441
|
var require_util_contains_newline = __commonJS({
|
|
215442
215442
|
"node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
215443
215443
|
"use strict";
|
|
215444
|
-
function containsNewline(
|
|
215445
|
-
if (!
|
|
215444
|
+
function containsNewline(key3) {
|
|
215445
|
+
if (!key3)
|
|
215446
215446
|
return null;
|
|
215447
|
-
switch (
|
|
215447
|
+
switch (key3.type) {
|
|
215448
215448
|
case "alias":
|
|
215449
215449
|
case "scalar":
|
|
215450
215450
|
case "double-quoted-scalar":
|
|
215451
215451
|
case "single-quoted-scalar":
|
|
215452
|
-
if (
|
|
215452
|
+
if (key3.source.includes("\n"))
|
|
215453
215453
|
return true;
|
|
215454
|
-
if (
|
|
215455
|
-
for (const st of
|
|
215454
|
+
if (key3.end) {
|
|
215455
|
+
for (const st of key3.end)
|
|
215456
215456
|
if (st.type === "newline")
|
|
215457
215457
|
return true;
|
|
215458
215458
|
}
|
|
215459
215459
|
return false;
|
|
215460
215460
|
case "flow-collection":
|
|
215461
|
-
for (const it of
|
|
215461
|
+
for (const it of key3.items) {
|
|
215462
215462
|
for (const st of it.start)
|
|
215463
215463
|
if (st.type === "newline")
|
|
215464
215464
|
return true;
|
|
@@ -215532,10 +215532,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
215532
215532
|
let offset = bm.offset;
|
|
215533
215533
|
let commentEnd = null;
|
|
215534
215534
|
for (const collItem of bm.items) {
|
|
215535
|
-
const { start, key:
|
|
215535
|
+
const { start, key: key3, sep, value } = collItem;
|
|
215536
215536
|
const keyProps = resolveProps.resolveProps(start, {
|
|
215537
215537
|
indicator: "explicit-key-ind",
|
|
215538
|
-
next:
|
|
215538
|
+
next: key3 ?? sep?.[0],
|
|
215539
215539
|
offset,
|
|
215540
215540
|
onError,
|
|
215541
215541
|
parentIndent: bm.indent,
|
|
@@ -215543,10 +215543,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
215543
215543
|
});
|
|
215544
215544
|
const implicitKey = !keyProps.found;
|
|
215545
215545
|
if (implicitKey) {
|
|
215546
|
-
if (
|
|
215547
|
-
if (
|
|
215546
|
+
if (key3) {
|
|
215547
|
+
if (key3.type === "block-seq")
|
|
215548
215548
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
|
215549
|
-
else if ("indent" in
|
|
215549
|
+
else if ("indent" in key3 && key3.indent !== bm.indent)
|
|
215550
215550
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
215551
215551
|
}
|
|
215552
215552
|
if (!keyProps.anchor && !keyProps.tag && !sep) {
|
|
@@ -215559,17 +215559,17 @@ var require_resolve_block_map = __commonJS({
|
|
|
215559
215559
|
}
|
|
215560
215560
|
continue;
|
|
215561
215561
|
}
|
|
215562
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
|
215563
|
-
onError(
|
|
215562
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key3)) {
|
|
215563
|
+
onError(key3 ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
215564
215564
|
}
|
|
215565
215565
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
215566
215566
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
215567
215567
|
}
|
|
215568
215568
|
ctx.atKey = true;
|
|
215569
215569
|
const keyStart = keyProps.end;
|
|
215570
|
-
const keyNode =
|
|
215570
|
+
const keyNode = key3 ? composeNode(ctx, key3, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
|
|
215571
215571
|
if (ctx.schema.compat)
|
|
215572
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
|
215572
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key3, onError);
|
|
215573
215573
|
ctx.atKey = false;
|
|
215574
215574
|
if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode))
|
|
215575
215575
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
@@ -215579,7 +215579,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
215579
215579
|
offset: keyNode.range[2],
|
|
215580
215580
|
onError,
|
|
215581
215581
|
parentIndent: bm.indent,
|
|
215582
|
-
startOnNewline: !
|
|
215582
|
+
startOnNewline: !key3 || key3.type === "block-scalar"
|
|
215583
215583
|
});
|
|
215584
215584
|
offset = valueProps.end;
|
|
215585
215585
|
if (valueProps.found) {
|
|
@@ -215743,11 +215743,11 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215743
215743
|
let offset = fc.offset + fc.start.source.length;
|
|
215744
215744
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
215745
215745
|
const collItem = fc.items[i];
|
|
215746
|
-
const { start, key:
|
|
215746
|
+
const { start, key: key3, sep, value } = collItem;
|
|
215747
215747
|
const props = resolveProps.resolveProps(start, {
|
|
215748
215748
|
flow: fcName,
|
|
215749
215749
|
indicator: "explicit-key-ind",
|
|
215750
|
-
next:
|
|
215750
|
+
next: key3 ?? sep?.[0],
|
|
215751
215751
|
offset,
|
|
215752
215752
|
onError,
|
|
215753
215753
|
parentIndent: fc.indent,
|
|
@@ -215768,9 +215768,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215768
215768
|
offset = props.end;
|
|
215769
215769
|
continue;
|
|
215770
215770
|
}
|
|
215771
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
|
215771
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key3))
|
|
215772
215772
|
onError(
|
|
215773
|
-
|
|
215773
|
+
key3,
|
|
215774
215774
|
// checked by containsNewline()
|
|
215775
215775
|
"MULTILINE_IMPLICIT_KEY",
|
|
215776
215776
|
"Implicit keys of flow sequence pairs need to be on a single line"
|
|
@@ -215817,8 +215817,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215817
215817
|
} else {
|
|
215818
215818
|
ctx.atKey = true;
|
|
215819
215819
|
const keyStart = props.end;
|
|
215820
|
-
const keyNode =
|
|
215821
|
-
if (isBlock(
|
|
215820
|
+
const keyNode = key3 ? composeNode(ctx, key3, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
|
|
215821
|
+
if (isBlock(key3))
|
|
215822
215822
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
215823
215823
|
ctx.atKey = false;
|
|
215824
215824
|
const valueProps = resolveProps.resolveProps(sep ?? [], {
|
|
@@ -216967,9 +216967,9 @@ var require_cst_scalar = __commonJS({
|
|
|
216967
216967
|
];
|
|
216968
216968
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0))
|
|
216969
216969
|
props.push({ type: "newline", offset: -1, indent, source: "\n" });
|
|
216970
|
-
for (const
|
|
216971
|
-
if (
|
|
216972
|
-
delete token[
|
|
216970
|
+
for (const key3 of Object.keys(token))
|
|
216971
|
+
if (key3 !== "type" && key3 !== "offset")
|
|
216972
|
+
delete token[key3];
|
|
216973
216973
|
Object.assign(token, { type: "block-scalar", indent, props, source: body });
|
|
216974
216974
|
}
|
|
216975
216975
|
}
|
|
@@ -217017,9 +217017,9 @@ var require_cst_scalar = __commonJS({
|
|
|
217017
217017
|
default: {
|
|
217018
217018
|
const indent = "indent" in token ? token.indent : -1;
|
|
217019
217019
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === "space" || st.type === "comment" || st.type === "newline") : [];
|
|
217020
|
-
for (const
|
|
217021
|
-
if (
|
|
217022
|
-
delete token[
|
|
217020
|
+
for (const key3 of Object.keys(token))
|
|
217021
|
+
if (key3 !== "type" && key3 !== "offset")
|
|
217022
|
+
delete token[key3];
|
|
217023
217023
|
Object.assign(token, { type, indent, source, end });
|
|
217024
217024
|
}
|
|
217025
217025
|
}
|
|
@@ -217074,12 +217074,12 @@ var require_cst_stringify = __commonJS({
|
|
|
217074
217074
|
}
|
|
217075
217075
|
}
|
|
217076
217076
|
}
|
|
217077
|
-
function stringifyItem({ start, key:
|
|
217077
|
+
function stringifyItem({ start, key: key3, sep, value }) {
|
|
217078
217078
|
let res = "";
|
|
217079
217079
|
for (const st of start)
|
|
217080
217080
|
res += st.source;
|
|
217081
|
-
if (
|
|
217082
|
-
res += stringifyToken(
|
|
217081
|
+
if (key3)
|
|
217082
|
+
res += stringifyToken(key3);
|
|
217083
217083
|
if (sep)
|
|
217084
217084
|
for (const st of sep)
|
|
217085
217085
|
res += st.source;
|
|
@@ -218411,7 +218411,7 @@ var require_parser = __commonJS({
|
|
|
218411
218411
|
});
|
|
218412
218412
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
218413
218413
|
const start2 = getFirstKeyStartProps(it.start);
|
|
218414
|
-
const
|
|
218414
|
+
const key3 = it.key;
|
|
218415
218415
|
const sep = it.sep;
|
|
218416
218416
|
sep.push(this.sourceToken);
|
|
218417
218417
|
delete it.key;
|
|
@@ -218420,7 +218420,7 @@ var require_parser = __commonJS({
|
|
|
218420
218420
|
type: "block-map",
|
|
218421
218421
|
offset: this.offset,
|
|
218422
218422
|
indent: this.indent,
|
|
218423
|
-
items: [{ start: start2, key:
|
|
218423
|
+
items: [{ start: start2, key: key3, sep }]
|
|
218424
218424
|
});
|
|
218425
218425
|
} else if (start.length > 0) {
|
|
218426
218426
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -219693,9 +219693,9 @@ function floatSafeRemainder(val, step) {
|
|
|
219693
219693
|
return ratio - roundedRatio;
|
|
219694
219694
|
}
|
|
219695
219695
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
219696
|
-
function defineLazy(object2,
|
|
219696
|
+
function defineLazy(object2, key3, getter) {
|
|
219697
219697
|
let value = void 0;
|
|
219698
|
-
Object.defineProperty(object2,
|
|
219698
|
+
Object.defineProperty(object2, key3, {
|
|
219699
219699
|
get() {
|
|
219700
219700
|
if (value === EVALUATING) {
|
|
219701
219701
|
return void 0;
|
|
@@ -219707,7 +219707,7 @@ function defineLazy(object2, key2, getter) {
|
|
|
219707
219707
|
return value;
|
|
219708
219708
|
},
|
|
219709
219709
|
set(v) {
|
|
219710
|
-
Object.defineProperty(object2,
|
|
219710
|
+
Object.defineProperty(object2, key3, {
|
|
219711
219711
|
value: v
|
|
219712
219712
|
// configurable: true,
|
|
219713
219713
|
});
|
|
@@ -219740,11 +219740,11 @@ function cloneDef(schema) {
|
|
|
219740
219740
|
function getElementAtPath(obj, path) {
|
|
219741
219741
|
if (!path)
|
|
219742
219742
|
return obj;
|
|
219743
|
-
return path.reduce((acc,
|
|
219743
|
+
return path.reduce((acc, key3) => acc?.[key3], obj);
|
|
219744
219744
|
}
|
|
219745
219745
|
function promiseAllObject(promisesObj) {
|
|
219746
219746
|
const keys = Object.keys(promisesObj);
|
|
219747
|
-
const promises = keys.map((
|
|
219747
|
+
const promises = keys.map((key3) => promisesObj[key3]);
|
|
219748
219748
|
return Promise.all(promises).then((results) => {
|
|
219749
219749
|
const resolvedObj = {};
|
|
219750
219750
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -219816,8 +219816,8 @@ function shallowClone(o) {
|
|
|
219816
219816
|
}
|
|
219817
219817
|
function numKeys(data) {
|
|
219818
219818
|
let keyCount = 0;
|
|
219819
|
-
for (const
|
|
219820
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
|
219819
|
+
for (const key3 in data) {
|
|
219820
|
+
if (Object.prototype.hasOwnProperty.call(data, key3)) {
|
|
219821
219821
|
keyCount++;
|
|
219822
219822
|
}
|
|
219823
219823
|
}
|
|
@@ -219967,13 +219967,13 @@ function pick(schema, mask) {
|
|
|
219967
219967
|
const def = mergeDefs(schema._zod.def, {
|
|
219968
219968
|
get shape() {
|
|
219969
219969
|
const newShape = {};
|
|
219970
|
-
for (const
|
|
219971
|
-
if (!(
|
|
219972
|
-
throw new Error(`Unrecognized key: "${
|
|
219970
|
+
for (const key3 in mask) {
|
|
219971
|
+
if (!(key3 in currDef.shape)) {
|
|
219972
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
|
219973
219973
|
}
|
|
219974
|
-
if (!mask[
|
|
219974
|
+
if (!mask[key3])
|
|
219975
219975
|
continue;
|
|
219976
|
-
newShape[
|
|
219976
|
+
newShape[key3] = currDef.shape[key3];
|
|
219977
219977
|
}
|
|
219978
219978
|
assignProp(this, "shape", newShape);
|
|
219979
219979
|
return newShape;
|
|
@@ -219992,13 +219992,13 @@ function omit(schema, mask) {
|
|
|
219992
219992
|
const def = mergeDefs(schema._zod.def, {
|
|
219993
219993
|
get shape() {
|
|
219994
219994
|
const newShape = { ...schema._zod.def.shape };
|
|
219995
|
-
for (const
|
|
219996
|
-
if (!(
|
|
219997
|
-
throw new Error(`Unrecognized key: "${
|
|
219995
|
+
for (const key3 in mask) {
|
|
219996
|
+
if (!(key3 in currDef.shape)) {
|
|
219997
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
|
219998
219998
|
}
|
|
219999
|
-
if (!mask[
|
|
219999
|
+
if (!mask[key3])
|
|
220000
220000
|
continue;
|
|
220001
|
-
delete newShape[
|
|
220001
|
+
delete newShape[key3];
|
|
220002
220002
|
}
|
|
220003
220003
|
assignProp(this, "shape", newShape);
|
|
220004
220004
|
return newShape;
|
|
@@ -220015,8 +220015,8 @@ function extend(schema, shape) {
|
|
|
220015
220015
|
const hasChecks = checks && checks.length > 0;
|
|
220016
220016
|
if (hasChecks) {
|
|
220017
220017
|
const existingShape = schema._zod.def.shape;
|
|
220018
|
-
for (const
|
|
220019
|
-
if (Object.getOwnPropertyDescriptor(existingShape,
|
|
220018
|
+
for (const key3 in shape) {
|
|
220019
|
+
if (Object.getOwnPropertyDescriptor(existingShape, key3) !== void 0) {
|
|
220020
220020
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
220021
220021
|
}
|
|
220022
220022
|
}
|
|
@@ -220072,23 +220072,23 @@ function partial(Class2, schema, mask) {
|
|
|
220072
220072
|
const oldShape = schema._zod.def.shape;
|
|
220073
220073
|
const shape = { ...oldShape };
|
|
220074
220074
|
if (mask) {
|
|
220075
|
-
for (const
|
|
220076
|
-
if (!(
|
|
220077
|
-
throw new Error(`Unrecognized key: "${
|
|
220075
|
+
for (const key3 in mask) {
|
|
220076
|
+
if (!(key3 in oldShape)) {
|
|
220077
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
|
220078
220078
|
}
|
|
220079
|
-
if (!mask[
|
|
220079
|
+
if (!mask[key3])
|
|
220080
220080
|
continue;
|
|
220081
|
-
shape[
|
|
220081
|
+
shape[key3] = Class2 ? new Class2({
|
|
220082
220082
|
type: "optional",
|
|
220083
|
-
innerType: oldShape[
|
|
220084
|
-
}) : oldShape[
|
|
220083
|
+
innerType: oldShape[key3]
|
|
220084
|
+
}) : oldShape[key3];
|
|
220085
220085
|
}
|
|
220086
220086
|
} else {
|
|
220087
|
-
for (const
|
|
220088
|
-
shape[
|
|
220087
|
+
for (const key3 in oldShape) {
|
|
220088
|
+
shape[key3] = Class2 ? new Class2({
|
|
220089
220089
|
type: "optional",
|
|
220090
|
-
innerType: oldShape[
|
|
220091
|
-
}) : oldShape[
|
|
220090
|
+
innerType: oldShape[key3]
|
|
220091
|
+
}) : oldShape[key3];
|
|
220092
220092
|
}
|
|
220093
220093
|
}
|
|
220094
220094
|
assignProp(this, "shape", shape);
|
|
@@ -220104,22 +220104,22 @@ function required(Class2, schema, mask) {
|
|
|
220104
220104
|
const oldShape = schema._zod.def.shape;
|
|
220105
220105
|
const shape = { ...oldShape };
|
|
220106
220106
|
if (mask) {
|
|
220107
|
-
for (const
|
|
220108
|
-
if (!(
|
|
220109
|
-
throw new Error(`Unrecognized key: "${
|
|
220107
|
+
for (const key3 in mask) {
|
|
220108
|
+
if (!(key3 in shape)) {
|
|
220109
|
+
throw new Error(`Unrecognized key: "${key3}"`);
|
|
220110
220110
|
}
|
|
220111
|
-
if (!mask[
|
|
220111
|
+
if (!mask[key3])
|
|
220112
220112
|
continue;
|
|
220113
|
-
shape[
|
|
220113
|
+
shape[key3] = new Class2({
|
|
220114
220114
|
type: "nonoptional",
|
|
220115
|
-
innerType: oldShape[
|
|
220115
|
+
innerType: oldShape[key3]
|
|
220116
220116
|
});
|
|
220117
220117
|
}
|
|
220118
220118
|
} else {
|
|
220119
|
-
for (const
|
|
220120
|
-
shape[
|
|
220119
|
+
for (const key3 in oldShape) {
|
|
220120
|
+
shape[key3] = new Class2({
|
|
220121
220121
|
type: "nonoptional",
|
|
220122
|
-
innerType: oldShape[
|
|
220122
|
+
innerType: oldShape[key3]
|
|
220123
220123
|
});
|
|
220124
220124
|
}
|
|
220125
220125
|
}
|
|
@@ -221900,13 +221900,13 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
221900
221900
|
return payload;
|
|
221901
221901
|
};
|
|
221902
221902
|
});
|
|
221903
|
-
function handlePropertyResult(result, final,
|
|
221904
|
-
const isPresent =
|
|
221903
|
+
function handlePropertyResult(result, final, key3, input, isOptionalIn, isOptionalOut) {
|
|
221904
|
+
const isPresent = key3 in input;
|
|
221905
221905
|
if (result.issues.length) {
|
|
221906
221906
|
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
221907
221907
|
return;
|
|
221908
221908
|
}
|
|
221909
|
-
final.issues.push(...prefixIssues(
|
|
221909
|
+
final.issues.push(...prefixIssues(key3, result.issues));
|
|
221910
221910
|
}
|
|
221911
221911
|
if (!isPresent && !isOptionalIn) {
|
|
221912
221912
|
if (!result.issues.length) {
|
|
@@ -221914,17 +221914,17 @@ function handlePropertyResult(result, final, key2, input, isOptionalIn, isOption
|
|
|
221914
221914
|
code: "invalid_type",
|
|
221915
221915
|
expected: "nonoptional",
|
|
221916
221916
|
input: void 0,
|
|
221917
|
-
path: [
|
|
221917
|
+
path: [key3]
|
|
221918
221918
|
});
|
|
221919
221919
|
}
|
|
221920
221920
|
return;
|
|
221921
221921
|
}
|
|
221922
221922
|
if (result.value === void 0) {
|
|
221923
221923
|
if (isPresent) {
|
|
221924
|
-
final.value[
|
|
221924
|
+
final.value[key3] = void 0;
|
|
221925
221925
|
}
|
|
221926
221926
|
} else {
|
|
221927
|
-
final.value[
|
|
221927
|
+
final.value[key3] = result.value;
|
|
221928
221928
|
}
|
|
221929
221929
|
}
|
|
221930
221930
|
function normalizeDef(def) {
|
|
@@ -221950,20 +221950,20 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
221950
221950
|
const t = _catchall.def.type;
|
|
221951
221951
|
const isOptionalIn = _catchall.optin === "optional";
|
|
221952
221952
|
const isOptionalOut = _catchall.optout === "optional";
|
|
221953
|
-
for (const
|
|
221954
|
-
if (
|
|
221953
|
+
for (const key3 in input) {
|
|
221954
|
+
if (key3 === "__proto__")
|
|
221955
221955
|
continue;
|
|
221956
|
-
if (keySet.has(
|
|
221956
|
+
if (keySet.has(key3))
|
|
221957
221957
|
continue;
|
|
221958
221958
|
if (t === "never") {
|
|
221959
|
-
unrecognized.push(
|
|
221959
|
+
unrecognized.push(key3);
|
|
221960
221960
|
continue;
|
|
221961
221961
|
}
|
|
221962
|
-
const r = _catchall.run({ value: input[
|
|
221962
|
+
const r = _catchall.run({ value: input[key3], issues: [] }, ctx);
|
|
221963
221963
|
if (r instanceof Promise) {
|
|
221964
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload,
|
|
221964
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key3, input, isOptionalIn, isOptionalOut)));
|
|
221965
221965
|
} else {
|
|
221966
|
-
handlePropertyResult(r, payload,
|
|
221966
|
+
handlePropertyResult(r, payload, key3, input, isOptionalIn, isOptionalOut);
|
|
221967
221967
|
}
|
|
221968
221968
|
}
|
|
221969
221969
|
if (unrecognized.length) {
|
|
@@ -221999,12 +221999,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
221999
221999
|
defineLazy(inst._zod, "propValues", () => {
|
|
222000
222000
|
const shape = def.shape;
|
|
222001
222001
|
const propValues = {};
|
|
222002
|
-
for (const
|
|
222003
|
-
const field = shape[
|
|
222002
|
+
for (const key3 in shape) {
|
|
222003
|
+
const field = shape[key3]._zod;
|
|
222004
222004
|
if (field.values) {
|
|
222005
|
-
propValues[
|
|
222005
|
+
propValues[key3] ?? (propValues[key3] = /* @__PURE__ */ new Set());
|
|
222006
222006
|
for (const v of field.values)
|
|
222007
|
-
propValues[
|
|
222007
|
+
propValues[key3].add(v);
|
|
222008
222008
|
}
|
|
222009
222009
|
}
|
|
222010
222010
|
return propValues;
|
|
@@ -222027,15 +222027,15 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
222027
222027
|
payload.value = {};
|
|
222028
222028
|
const proms = [];
|
|
222029
222029
|
const shape = value.shape;
|
|
222030
|
-
for (const
|
|
222031
|
-
const el = shape[
|
|
222030
|
+
for (const key3 of value.keys) {
|
|
222031
|
+
const el = shape[key3];
|
|
222032
222032
|
const isOptionalIn = el._zod.optin === "optional";
|
|
222033
222033
|
const isOptionalOut = el._zod.optout === "optional";
|
|
222034
|
-
const r = el._zod.run({ value: input[
|
|
222034
|
+
const r = el._zod.run({ value: input[key3], issues: [] }, ctx);
|
|
222035
222035
|
if (r instanceof Promise) {
|
|
222036
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload,
|
|
222036
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key3, input, isOptionalIn, isOptionalOut)));
|
|
222037
222037
|
} else {
|
|
222038
|
-
handlePropertyResult(r, payload,
|
|
222038
|
+
handlePropertyResult(r, payload, key3, input, isOptionalIn, isOptionalOut);
|
|
222039
222039
|
}
|
|
222040
222040
|
}
|
|
222041
222041
|
if (!catchall) {
|
|
@@ -222051,24 +222051,24 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
222051
222051
|
const generateFastpass = (shape) => {
|
|
222052
222052
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
222053
222053
|
const normalized = _normalized.value;
|
|
222054
|
-
const parseStr = (
|
|
222055
|
-
const k = esc(
|
|
222054
|
+
const parseStr = (key3) => {
|
|
222055
|
+
const k = esc(key3);
|
|
222056
222056
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
222057
222057
|
};
|
|
222058
222058
|
doc.write(`const input = payload.value;`);
|
|
222059
222059
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
222060
222060
|
let counter = 0;
|
|
222061
|
-
for (const
|
|
222062
|
-
ids[
|
|
222061
|
+
for (const key3 of normalized.keys) {
|
|
222062
|
+
ids[key3] = `key_${counter++}`;
|
|
222063
222063
|
}
|
|
222064
222064
|
doc.write(`const newResult = {};`);
|
|
222065
|
-
for (const
|
|
222066
|
-
const id = ids[
|
|
222067
|
-
const k = esc(
|
|
222068
|
-
const schema = shape[
|
|
222065
|
+
for (const key3 of normalized.keys) {
|
|
222066
|
+
const id = ids[key3];
|
|
222067
|
+
const k = esc(key3);
|
|
222068
|
+
const schema = shape[key3];
|
|
222069
222069
|
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
222070
222070
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
222071
|
-
doc.write(`const ${id} = ${parseStr(
|
|
222071
|
+
doc.write(`const ${id} = ${parseStr(key3)};`);
|
|
222072
222072
|
if (isOptionalIn && isOptionalOut) {
|
|
222073
222073
|
doc.write(`
|
|
222074
222074
|
if (${id}.issues.length) {
|
|
@@ -222380,17 +222380,17 @@ function mergeValues(a, b) {
|
|
|
222380
222380
|
}
|
|
222381
222381
|
if (isPlainObject(a) && isPlainObject(b)) {
|
|
222382
222382
|
const bKeys = Object.keys(b);
|
|
222383
|
-
const sharedKeys = Object.keys(a).filter((
|
|
222383
|
+
const sharedKeys = Object.keys(a).filter((key3) => bKeys.indexOf(key3) !== -1);
|
|
222384
222384
|
const newObj = { ...a, ...b };
|
|
222385
|
-
for (const
|
|
222386
|
-
const sharedValue = mergeValues(a[
|
|
222385
|
+
for (const key3 of sharedKeys) {
|
|
222386
|
+
const sharedValue = mergeValues(a[key3], b[key3]);
|
|
222387
222387
|
if (!sharedValue.valid) {
|
|
222388
222388
|
return {
|
|
222389
222389
|
valid: false,
|
|
222390
|
-
mergeErrorPath: [
|
|
222390
|
+
mergeErrorPath: [key3, ...sharedValue.mergeErrorPath]
|
|
222391
222391
|
};
|
|
222392
222392
|
}
|
|
222393
|
-
newObj[
|
|
222393
|
+
newObj[key3] = sharedValue.data;
|
|
222394
222394
|
}
|
|
222395
222395
|
return { valid: true, data: newObj };
|
|
222396
222396
|
}
|
|
@@ -222525,9 +222525,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
222525
222525
|
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
222526
222526
|
};
|
|
222527
222527
|
});
|
|
222528
|
-
function getTupleOptStart(items,
|
|
222528
|
+
function getTupleOptStart(items, key3) {
|
|
222529
222529
|
for (let i = items.length - 1; i >= 0; i--) {
|
|
222530
|
-
if (items[i]._zod[
|
|
222530
|
+
if (items[i]._zod[key3] !== "optional")
|
|
222531
222531
|
return i + 1;
|
|
222532
222532
|
}
|
|
222533
222533
|
return 0;
|
|
@@ -222578,10 +222578,10 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222578
222578
|
if (values) {
|
|
222579
222579
|
payload.value = {};
|
|
222580
222580
|
const recordKeys = /* @__PURE__ */ new Set();
|
|
222581
|
-
for (const
|
|
222582
|
-
if (typeof
|
|
222583
|
-
recordKeys.add(typeof
|
|
222584
|
-
const keyResult = def.keyType._zod.run({ value:
|
|
222581
|
+
for (const key3 of values) {
|
|
222582
|
+
if (typeof key3 === "string" || typeof key3 === "number" || typeof key3 === "symbol") {
|
|
222583
|
+
recordKeys.add(typeof key3 === "number" ? key3.toString() : key3);
|
|
222584
|
+
const keyResult = def.keyType._zod.run({ value: key3, issues: [] }, ctx);
|
|
222585
222585
|
if (keyResult instanceof Promise) {
|
|
222586
222586
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222587
222587
|
}
|
|
@@ -222590,34 +222590,34 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222590
222590
|
code: "invalid_key",
|
|
222591
222591
|
origin: "record",
|
|
222592
222592
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
222593
|
-
input:
|
|
222594
|
-
path: [
|
|
222593
|
+
input: key3,
|
|
222594
|
+
path: [key3],
|
|
222595
222595
|
inst
|
|
222596
222596
|
});
|
|
222597
222597
|
continue;
|
|
222598
222598
|
}
|
|
222599
222599
|
const outKey = keyResult.value;
|
|
222600
|
-
const result = def.valueType._zod.run({ value: input[
|
|
222600
|
+
const result = def.valueType._zod.run({ value: input[key3], issues: [] }, ctx);
|
|
222601
222601
|
if (result instanceof Promise) {
|
|
222602
222602
|
proms.push(result.then((result2) => {
|
|
222603
222603
|
if (result2.issues.length) {
|
|
222604
|
-
payload.issues.push(...prefixIssues(
|
|
222604
|
+
payload.issues.push(...prefixIssues(key3, result2.issues));
|
|
222605
222605
|
}
|
|
222606
222606
|
payload.value[outKey] = result2.value;
|
|
222607
222607
|
}));
|
|
222608
222608
|
} else {
|
|
222609
222609
|
if (result.issues.length) {
|
|
222610
|
-
payload.issues.push(...prefixIssues(
|
|
222610
|
+
payload.issues.push(...prefixIssues(key3, result.issues));
|
|
222611
222611
|
}
|
|
222612
222612
|
payload.value[outKey] = result.value;
|
|
222613
222613
|
}
|
|
222614
222614
|
}
|
|
222615
222615
|
}
|
|
222616
222616
|
let unrecognized;
|
|
222617
|
-
for (const
|
|
222618
|
-
if (!recordKeys.has(
|
|
222617
|
+
for (const key3 in input) {
|
|
222618
|
+
if (!recordKeys.has(key3)) {
|
|
222619
222619
|
unrecognized = unrecognized ?? [];
|
|
222620
|
-
unrecognized.push(
|
|
222620
|
+
unrecognized.push(key3);
|
|
222621
222621
|
}
|
|
222622
222622
|
}
|
|
222623
222623
|
if (unrecognized && unrecognized.length > 0) {
|
|
@@ -222630,18 +222630,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222630
222630
|
}
|
|
222631
222631
|
} else {
|
|
222632
222632
|
payload.value = {};
|
|
222633
|
-
for (const
|
|
222634
|
-
if (
|
|
222633
|
+
for (const key3 of Reflect.ownKeys(input)) {
|
|
222634
|
+
if (key3 === "__proto__")
|
|
222635
222635
|
continue;
|
|
222636
|
-
if (!Object.prototype.propertyIsEnumerable.call(input,
|
|
222636
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key3))
|
|
222637
222637
|
continue;
|
|
222638
|
-
let keyResult = def.keyType._zod.run({ value:
|
|
222638
|
+
let keyResult = def.keyType._zod.run({ value: key3, issues: [] }, ctx);
|
|
222639
222639
|
if (keyResult instanceof Promise) {
|
|
222640
222640
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222641
222641
|
}
|
|
222642
|
-
const checkNumericKey = typeof
|
|
222642
|
+
const checkNumericKey = typeof key3 === "string" && number.test(key3) && keyResult.issues.length;
|
|
222643
222643
|
if (checkNumericKey) {
|
|
222644
|
-
const retryResult = def.keyType._zod.run({ value: Number(
|
|
222644
|
+
const retryResult = def.keyType._zod.run({ value: Number(key3), issues: [] }, ctx);
|
|
222645
222645
|
if (retryResult instanceof Promise) {
|
|
222646
222646
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222647
222647
|
}
|
|
@@ -222651,30 +222651,30 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222651
222651
|
}
|
|
222652
222652
|
if (keyResult.issues.length) {
|
|
222653
222653
|
if (def.mode === "loose") {
|
|
222654
|
-
payload.value[
|
|
222654
|
+
payload.value[key3] = input[key3];
|
|
222655
222655
|
} else {
|
|
222656
222656
|
payload.issues.push({
|
|
222657
222657
|
code: "invalid_key",
|
|
222658
222658
|
origin: "record",
|
|
222659
222659
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
222660
|
-
input:
|
|
222661
|
-
path: [
|
|
222660
|
+
input: key3,
|
|
222661
|
+
path: [key3],
|
|
222662
222662
|
inst
|
|
222663
222663
|
});
|
|
222664
222664
|
}
|
|
222665
222665
|
continue;
|
|
222666
222666
|
}
|
|
222667
|
-
const result = def.valueType._zod.run({ value: input[
|
|
222667
|
+
const result = def.valueType._zod.run({ value: input[key3], issues: [] }, ctx);
|
|
222668
222668
|
if (result instanceof Promise) {
|
|
222669
222669
|
proms.push(result.then((result2) => {
|
|
222670
222670
|
if (result2.issues.length) {
|
|
222671
|
-
payload.issues.push(...prefixIssues(
|
|
222671
|
+
payload.issues.push(...prefixIssues(key3, result2.issues));
|
|
222672
222672
|
}
|
|
222673
222673
|
payload.value[keyResult.value] = result2.value;
|
|
222674
222674
|
}));
|
|
222675
222675
|
} else {
|
|
222676
222676
|
if (result.issues.length) {
|
|
222677
|
-
payload.issues.push(...prefixIssues(
|
|
222677
|
+
payload.issues.push(...prefixIssues(key3, result.issues));
|
|
222678
222678
|
}
|
|
222679
222679
|
payload.value[keyResult.value] = result.value;
|
|
222680
222680
|
}
|
|
@@ -222701,15 +222701,15 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
222701
222701
|
}
|
|
222702
222702
|
const proms = [];
|
|
222703
222703
|
payload.value = /* @__PURE__ */ new Map();
|
|
222704
|
-
for (const [
|
|
222705
|
-
const keyResult = def.keyType._zod.run({ value:
|
|
222704
|
+
for (const [key3, value] of input) {
|
|
222705
|
+
const keyResult = def.keyType._zod.run({ value: key3, issues: [] }, ctx);
|
|
222706
222706
|
const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
|
|
222707
222707
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
222708
222708
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
|
|
222709
|
-
handleMapResult(keyResult2, valueResult2, payload,
|
|
222709
|
+
handleMapResult(keyResult2, valueResult2, payload, key3, input, inst, ctx);
|
|
222710
222710
|
}));
|
|
222711
222711
|
} else {
|
|
222712
|
-
handleMapResult(keyResult, valueResult, payload,
|
|
222712
|
+
handleMapResult(keyResult, valueResult, payload, key3, input, inst, ctx);
|
|
222713
222713
|
}
|
|
222714
222714
|
}
|
|
222715
222715
|
if (proms.length)
|
|
@@ -222717,10 +222717,10 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
222717
222717
|
return payload;
|
|
222718
222718
|
};
|
|
222719
222719
|
});
|
|
222720
|
-
function handleMapResult(keyResult, valueResult, final,
|
|
222720
|
+
function handleMapResult(keyResult, valueResult, final, key3, input, inst, ctx) {
|
|
222721
222721
|
if (keyResult.issues.length) {
|
|
222722
|
-
if (propertyKeyTypes.has(typeof
|
|
222723
|
-
final.issues.push(...prefixIssues(
|
|
222722
|
+
if (propertyKeyTypes.has(typeof key3)) {
|
|
222723
|
+
final.issues.push(...prefixIssues(key3, keyResult.issues));
|
|
222724
222724
|
} else {
|
|
222725
222725
|
final.issues.push({
|
|
222726
222726
|
code: "invalid_key",
|
|
@@ -222732,15 +222732,15 @@ function handleMapResult(keyResult, valueResult, final, key2, input, inst, ctx)
|
|
|
222732
222732
|
}
|
|
222733
222733
|
}
|
|
222734
222734
|
if (valueResult.issues.length) {
|
|
222735
|
-
if (propertyKeyTypes.has(typeof
|
|
222736
|
-
final.issues.push(...prefixIssues(
|
|
222735
|
+
if (propertyKeyTypes.has(typeof key3)) {
|
|
222736
|
+
final.issues.push(...prefixIssues(key3, valueResult.issues));
|
|
222737
222737
|
} else {
|
|
222738
222738
|
final.issues.push({
|
|
222739
222739
|
origin: "map",
|
|
222740
222740
|
code: "invalid_element",
|
|
222741
222741
|
input,
|
|
222742
222742
|
inst,
|
|
222743
|
-
key:
|
|
222743
|
+
key: key3,
|
|
222744
222744
|
issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
222745
222745
|
});
|
|
222746
222746
|
}
|
|
@@ -230501,8 +230501,8 @@ function extractDefs(ctx, schema) {
|
|
|
230501
230501
|
if (defId)
|
|
230502
230502
|
seen.defId = defId;
|
|
230503
230503
|
const schema2 = seen.schema;
|
|
230504
|
-
for (const
|
|
230505
|
-
delete schema2[
|
|
230504
|
+
for (const key3 in schema2) {
|
|
230505
|
+
delete schema2[key3];
|
|
230506
230506
|
}
|
|
230507
230507
|
schema2.$ref = ref;
|
|
230508
230508
|
};
|
|
@@ -230571,20 +230571,20 @@ function finalize(ctx, schema) {
|
|
|
230571
230571
|
Object.assign(schema2, _cached);
|
|
230572
230572
|
const isParentRef = zodSchema._zod.parent === ref;
|
|
230573
230573
|
if (isParentRef) {
|
|
230574
|
-
for (const
|
|
230575
|
-
if (
|
|
230574
|
+
for (const key3 in schema2) {
|
|
230575
|
+
if (key3 === "$ref" || key3 === "allOf")
|
|
230576
230576
|
continue;
|
|
230577
|
-
if (!(
|
|
230578
|
-
delete schema2[
|
|
230577
|
+
if (!(key3 in _cached)) {
|
|
230578
|
+
delete schema2[key3];
|
|
230579
230579
|
}
|
|
230580
230580
|
}
|
|
230581
230581
|
}
|
|
230582
230582
|
if (refSchema.$ref && refSeen.def) {
|
|
230583
|
-
for (const
|
|
230584
|
-
if (
|
|
230583
|
+
for (const key3 in schema2) {
|
|
230584
|
+
if (key3 === "$ref" || key3 === "allOf")
|
|
230585
230585
|
continue;
|
|
230586
|
-
if (
|
|
230587
|
-
delete schema2[
|
|
230586
|
+
if (key3 in refSeen.def && JSON.stringify(schema2[key3]) === JSON.stringify(refSeen.def[key3])) {
|
|
230587
|
+
delete schema2[key3];
|
|
230588
230588
|
}
|
|
230589
230589
|
}
|
|
230590
230590
|
}
|
|
@@ -230596,11 +230596,11 @@ function finalize(ctx, schema) {
|
|
|
230596
230596
|
if (parentSeen?.schema.$ref) {
|
|
230597
230597
|
schema2.$ref = parentSeen.schema.$ref;
|
|
230598
230598
|
if (parentSeen.def) {
|
|
230599
|
-
for (const
|
|
230600
|
-
if (
|
|
230599
|
+
for (const key3 in schema2) {
|
|
230600
|
+
if (key3 === "$ref" || key3 === "allOf")
|
|
230601
230601
|
continue;
|
|
230602
|
-
if (
|
|
230603
|
-
delete schema2[
|
|
230602
|
+
if (key3 in parentSeen.def && JSON.stringify(schema2[key3]) === JSON.stringify(parentSeen.def[key3])) {
|
|
230603
|
+
delete schema2[key3];
|
|
230604
230604
|
}
|
|
230605
230605
|
}
|
|
230606
230606
|
}
|
|
@@ -230701,8 +230701,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
230701
230701
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
230702
230702
|
}
|
|
230703
230703
|
if (def.type === "object") {
|
|
230704
|
-
for (const
|
|
230705
|
-
if (isTransforming(def.shape[
|
|
230704
|
+
for (const key3 in def.shape) {
|
|
230705
|
+
if (isTransforming(def.shape[key3], ctx))
|
|
230706
230706
|
return true;
|
|
230707
230707
|
}
|
|
230708
230708
|
return false;
|
|
@@ -230991,15 +230991,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
230991
230991
|
json2.type = "object";
|
|
230992
230992
|
json2.properties = {};
|
|
230993
230993
|
const shape = def.shape;
|
|
230994
|
-
for (const
|
|
230995
|
-
json2.properties[
|
|
230994
|
+
for (const key3 in shape) {
|
|
230995
|
+
json2.properties[key3] = process2(shape[key3], ctx, {
|
|
230996
230996
|
...params,
|
|
230997
|
-
path: [...params.path, "properties",
|
|
230997
|
+
path: [...params.path, "properties", key3]
|
|
230998
230998
|
});
|
|
230999
230999
|
}
|
|
231000
231000
|
const allKeys = new Set(Object.keys(shape));
|
|
231001
|
-
const requiredKeys = new Set([...allKeys].filter((
|
|
231002
|
-
const v = def.shape[
|
|
231001
|
+
const requiredKeys = new Set([...allKeys].filter((key3) => {
|
|
231002
|
+
const v = def.shape[key3]._zod;
|
|
231003
231003
|
if (ctx.io === "input") {
|
|
231004
231004
|
return v.optin === void 0;
|
|
231005
231005
|
} else {
|
|
@@ -231265,9 +231265,9 @@ function toJSONSchema(input, params) {
|
|
|
231265
231265
|
};
|
|
231266
231266
|
ctx2.external = external;
|
|
231267
231267
|
for (const entry of registry3._idmap.entries()) {
|
|
231268
|
-
const [
|
|
231268
|
+
const [key3, schema] = entry;
|
|
231269
231269
|
extractDefs(ctx2, schema);
|
|
231270
|
-
schemas[
|
|
231270
|
+
schemas[key3] = finalize(ctx2, schema);
|
|
231271
231271
|
}
|
|
231272
231272
|
if (Object.keys(defs).length > 0) {
|
|
231273
231273
|
const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
@@ -231673,14 +231673,14 @@ function _installLazyMethods(inst, group, methods) {
|
|
|
231673
231673
|
if (installed.has(group))
|
|
231674
231674
|
return;
|
|
231675
231675
|
installed.add(group);
|
|
231676
|
-
for (const
|
|
231677
|
-
const fn = methods[
|
|
231678
|
-
Object.defineProperty(proto,
|
|
231676
|
+
for (const key3 in methods) {
|
|
231677
|
+
const fn = methods[key3];
|
|
231678
|
+
Object.defineProperty(proto, key3, {
|
|
231679
231679
|
configurable: true,
|
|
231680
231680
|
enumerable: false,
|
|
231681
231681
|
get() {
|
|
231682
231682
|
const bound = fn.bind(this);
|
|
231683
|
-
Object.defineProperty(this,
|
|
231683
|
+
Object.defineProperty(this, key3, {
|
|
231684
231684
|
configurable: true,
|
|
231685
231685
|
writable: true,
|
|
231686
231686
|
enumerable: true,
|
|
@@ -231689,7 +231689,7 @@ function _installLazyMethods(inst, group, methods) {
|
|
|
231689
231689
|
return bound;
|
|
231690
231690
|
},
|
|
231691
231691
|
set(v) {
|
|
231692
|
-
Object.defineProperty(this,
|
|
231692
|
+
Object.defineProperty(this, key3, {
|
|
231693
231693
|
configurable: true,
|
|
231694
231694
|
writable: true,
|
|
231695
231695
|
enumerable: true,
|
|
@@ -233077,11 +233077,11 @@ function resolveRef(ref, ctx) {
|
|
|
233077
233077
|
}
|
|
233078
233078
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
233079
233079
|
if (path[0] === defsKey) {
|
|
233080
|
-
const
|
|
233081
|
-
if (!
|
|
233080
|
+
const key3 = path[1];
|
|
233081
|
+
if (!key3 || !ctx.defs[key3]) {
|
|
233082
233082
|
throw new Error(`Reference not found: ${ref}`);
|
|
233083
233083
|
}
|
|
233084
|
-
return ctx.defs[
|
|
233084
|
+
return ctx.defs[key3];
|
|
233085
233085
|
}
|
|
233086
233086
|
throw new Error(`Reference not found: ${ref}`);
|
|
233087
233087
|
}
|
|
@@ -233267,9 +233267,9 @@ function convertBaseSchema(schema, ctx) {
|
|
|
233267
233267
|
const shape = {};
|
|
233268
233268
|
const properties = schema.properties || {};
|
|
233269
233269
|
const requiredSet = new Set(schema.required || []);
|
|
233270
|
-
for (const [
|
|
233270
|
+
for (const [key3, propSchema] of Object.entries(properties)) {
|
|
233271
233271
|
const propZodSchema = convertSchema(propSchema, ctx);
|
|
233272
|
-
shape[
|
|
233272
|
+
shape[key3] = requiredSet.has(key3) ? propZodSchema : propZodSchema.optional();
|
|
233273
233273
|
}
|
|
233274
233274
|
if (schema.propertyNames) {
|
|
233275
233275
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
@@ -233410,20 +233410,20 @@ function convertSchema(schema, ctx) {
|
|
|
233410
233410
|
}
|
|
233411
233411
|
const extraMeta = {};
|
|
233412
233412
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
233413
|
-
for (const
|
|
233414
|
-
if (
|
|
233415
|
-
extraMeta[
|
|
233413
|
+
for (const key3 of coreMetadataKeys) {
|
|
233414
|
+
if (key3 in schema) {
|
|
233415
|
+
extraMeta[key3] = schema[key3];
|
|
233416
233416
|
}
|
|
233417
233417
|
}
|
|
233418
233418
|
const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
|
|
233419
|
-
for (const
|
|
233420
|
-
if (
|
|
233421
|
-
extraMeta[
|
|
233419
|
+
for (const key3 of contentMetadataKeys) {
|
|
233420
|
+
if (key3 in schema) {
|
|
233421
|
+
extraMeta[key3] = schema[key3];
|
|
233422
233422
|
}
|
|
233423
233423
|
}
|
|
233424
|
-
for (const
|
|
233425
|
-
if (!RECOGNIZED_KEYS.has(
|
|
233426
|
-
extraMeta[
|
|
233424
|
+
for (const key3 of Object.keys(schema)) {
|
|
233425
|
+
if (!RECOGNIZED_KEYS.has(key3)) {
|
|
233426
|
+
extraMeta[key3] = schema[key3];
|
|
233427
233427
|
}
|
|
233428
233428
|
}
|
|
233429
233429
|
if (Object.keys(extraMeta).length > 0) {
|
|
@@ -234151,7 +234151,7 @@ var accountTraitKeys = [
|
|
|
234151
234151
|
"users"
|
|
234152
234152
|
];
|
|
234153
234153
|
var explicitTopLevelAccountTraitKeys = accountTraitKeys.filter(
|
|
234154
|
-
(
|
|
234154
|
+
(key22) => ![
|
|
234155
234155
|
"created_at",
|
|
234156
234156
|
"createdAt",
|
|
234157
234157
|
"current_plan",
|
|
@@ -234159,7 +234159,7 @@ var explicitTopLevelAccountTraitKeys = accountTraitKeys.filter(
|
|
|
234159
234159
|
"plan",
|
|
234160
234160
|
"status",
|
|
234161
234161
|
"users"
|
|
234162
|
-
].includes(
|
|
234162
|
+
].includes(key22)
|
|
234163
234163
|
);
|
|
234164
234164
|
function boundedTraitValue(value) {
|
|
234165
234165
|
if (typeof value === "string") return value.trim() ? value.trim() : void 0;
|
|
@@ -234170,9 +234170,9 @@ function boundedTraitValue(value) {
|
|
|
234170
234170
|
function pickAccountTraits(records, keys = accountTraitKeys) {
|
|
234171
234171
|
const traits = {};
|
|
234172
234172
|
for (const record2 of records) {
|
|
234173
|
-
for (const
|
|
234174
|
-
const value = boundedTraitValue(record2[
|
|
234175
|
-
if (value !== void 0) traits[
|
|
234173
|
+
for (const key22 of keys) {
|
|
234174
|
+
const value = boundedTraitValue(record2[key22]);
|
|
234175
|
+
if (value !== void 0) traits[key22] = value;
|
|
234176
234176
|
}
|
|
234177
234177
|
}
|
|
234178
234178
|
return traits;
|
|
@@ -234215,22 +234215,22 @@ function accountTraitsFromPayload({
|
|
|
234215
234215
|
function redactString(value) {
|
|
234216
234216
|
return value.replace(emailPattern, "[redacted-email]").replace(tokenLikePattern, "[redacted-token]");
|
|
234217
234217
|
}
|
|
234218
|
-
function isIdentifierKey(
|
|
234219
|
-
return /^(account_id|account_key|workspace_id)$/i.test(
|
|
234218
|
+
function isIdentifierKey(key22) {
|
|
234219
|
+
return /^(account_id|account_key|workspace_id)$/i.test(key22);
|
|
234220
234220
|
}
|
|
234221
|
-
function isBusinessMetadataKey(
|
|
234222
|
-
return /^(feature_key|is_key_feature|product_key|metric_key)$/i.test(
|
|
234221
|
+
function isBusinessMetadataKey(key22) {
|
|
234222
|
+
return /^(feature_key|is_key_feature|product_key|metric_key)$/i.test(key22);
|
|
234223
234223
|
}
|
|
234224
|
-
function isSensitiveKey(
|
|
234225
|
-
if (options.preserveIdentifierValues && isIdentifierKey(
|
|
234226
|
-
if (isBusinessMetadataKey(
|
|
234227
|
-
return sensitiveKeyPattern.test(
|
|
234224
|
+
function isSensitiveKey(key22, options) {
|
|
234225
|
+
if (options.preserveIdentifierValues && isIdentifierKey(key22)) return false;
|
|
234226
|
+
if (isBusinessMetadataKey(key22)) return false;
|
|
234227
|
+
return sensitiveKeyPattern.test(key22);
|
|
234228
234228
|
}
|
|
234229
|
-
function preservesIdentifierValue(
|
|
234230
|
-
return Boolean(options.preserveIdentifierValues && isIdentifierKey(
|
|
234229
|
+
function preservesIdentifierValue(key22, options) {
|
|
234230
|
+
return Boolean(options.preserveIdentifierValues && isIdentifierKey(key22));
|
|
234231
234231
|
}
|
|
234232
|
-
function isRawNavigationKey(
|
|
234233
|
-
return rawNavigationKeyPattern.test(
|
|
234232
|
+
function isRawNavigationKey(key22) {
|
|
234233
|
+
return rawNavigationKeyPattern.test(key22);
|
|
234234
234234
|
}
|
|
234235
234235
|
function validateEventName(eventName) {
|
|
234236
234236
|
if (eventName.length > MAX_EVENT_NAME_LENGTH)
|
|
@@ -234310,10 +234310,10 @@ function redactPayload(value, depth = 0, options = {}) {
|
|
|
234310
234310
|
return value.slice(0, 50).map((item) => redactPayload(item, depth + 1, options));
|
|
234311
234311
|
if (!value || typeof value !== "object") return void 0;
|
|
234312
234312
|
const redacted = {};
|
|
234313
|
-
for (const [
|
|
234313
|
+
for (const [key22, nestedValue] of Object.entries(
|
|
234314
234314
|
value
|
|
234315
234315
|
)) {
|
|
234316
|
-
redacted[
|
|
234316
|
+
redacted[key22] = isSensitiveKey(key22, options) ? "[redacted]" : isRawNavigationKey(key22) ? sanitizeUrl(nestedValue) : preservesIdentifierValue(key22, options) ? nestedValue : redactPayload(nestedValue, depth + 1, options);
|
|
234317
234317
|
}
|
|
234318
234318
|
return redacted;
|
|
234319
234319
|
}
|
|
@@ -234326,8 +234326,8 @@ function sanitizeUrl(value) {
|
|
|
234326
234326
|
raw.startsWith("/") ? "https://app.local" : void 0
|
|
234327
234327
|
);
|
|
234328
234328
|
const utmParams = {};
|
|
234329
|
-
for (const [
|
|
234330
|
-
if (
|
|
234329
|
+
for (const [key22, paramValue] of parsed.searchParams.entries()) {
|
|
234330
|
+
if (key22.startsWith("utm_")) utmParams[key22] = redactString(paramValue);
|
|
234331
234331
|
}
|
|
234332
234332
|
return {
|
|
234333
234333
|
host: parsed.hostname === "app.local" ? void 0 : parsed.hostname,
|
|
@@ -234340,8 +234340,8 @@ function sanitizeUrl(value) {
|
|
|
234340
234340
|
}
|
|
234341
234341
|
function propertiesWithoutRawNavigation(properties) {
|
|
234342
234342
|
const sanitized = { ...properties };
|
|
234343
|
-
for (const
|
|
234344
|
-
delete sanitized[
|
|
234343
|
+
for (const key22 of ["url", "referrer", "$current_url", "$referrer"]) {
|
|
234344
|
+
delete sanitized[key22];
|
|
234345
234345
|
}
|
|
234346
234346
|
return sanitized;
|
|
234347
234347
|
}
|
|
@@ -234930,8 +234930,8 @@ function hasUrlQuery(value) {
|
|
|
234930
234930
|
return false;
|
|
234931
234931
|
}
|
|
234932
234932
|
}
|
|
234933
|
-
function isUnsafeKey(
|
|
234934
|
-
return !safeIdentifierKeys.has(
|
|
234933
|
+
function isUnsafeKey(key22) {
|
|
234934
|
+
return !safeIdentifierKeys.has(key22) && !safeBusinessKeys.has(key22) && sensitiveKeyPattern2.test(key22);
|
|
234935
234935
|
}
|
|
234936
234936
|
function scanUnsafeFields(value, path = "", found = []) {
|
|
234937
234937
|
if (found.length >= 25) return found;
|
|
@@ -234952,19 +234952,19 @@ function scanUnsafeFields(value, path = "", found = []) {
|
|
|
234952
234952
|
}
|
|
234953
234953
|
return found;
|
|
234954
234954
|
}
|
|
234955
|
-
for (const [
|
|
234956
|
-
const nextPath = path ? `${path}.${
|
|
234957
|
-
if (isUnsafeKey(
|
|
234955
|
+
for (const [key22, nestedValue] of Object.entries(value)) {
|
|
234956
|
+
const nextPath = path ? `${path}.${key22}` : key22;
|
|
234957
|
+
if (isUnsafeKey(key22)) {
|
|
234958
234958
|
found.push(
|
|
234959
234959
|
validationIssue({
|
|
234960
234960
|
code: "unsafe_field",
|
|
234961
|
-
message: `Field "${
|
|
234961
|
+
message: `Field "${key22}" looks sensitive. Send bounded codes or safe metadata instead.`,
|
|
234962
234962
|
path: nextPath,
|
|
234963
234963
|
severity: "error"
|
|
234964
234964
|
})
|
|
234965
234965
|
);
|
|
234966
234966
|
}
|
|
234967
|
-
if (rawNavigationKeyPattern2.test(
|
|
234967
|
+
if (rawNavigationKeyPattern2.test(key22) && typeof nestedValue === "string" && hasUrlQuery(nestedValue)) {
|
|
234968
234968
|
found.push(
|
|
234969
234969
|
validationIssue({
|
|
234970
234970
|
code: "unsafe_field",
|
|
@@ -235719,6 +235719,56 @@ function agentCapabilityAllowedAtBoundary(id, boundary, { mutationsEnabled = fal
|
|
|
235719
235719
|
return true;
|
|
235720
235720
|
}
|
|
235721
235721
|
|
|
235722
|
+
// src/setup-commercial.ts
|
|
235723
|
+
var key2 = external_exports.string().regex(/^[a-z][a-z0-9_.-]{0,79}$/);
|
|
235724
|
+
var quotaSchema = external_exports.object({
|
|
235725
|
+
unit: external_exports.string().min(1).max(80),
|
|
235726
|
+
period: external_exports.enum([
|
|
235727
|
+
"instantaneous",
|
|
235728
|
+
"billing_period",
|
|
235729
|
+
"calendar_month",
|
|
235730
|
+
"lifetime"
|
|
235731
|
+
]),
|
|
235732
|
+
aggregation: external_exports.enum(["current", "sum", "maximum"]),
|
|
235733
|
+
usageSource: external_exports.literal("customer_reported")
|
|
235734
|
+
}).strict();
|
|
235735
|
+
var provenanceSchema = external_exports.object({
|
|
235736
|
+
file: external_exports.string().min(1).max(200).refine(
|
|
235737
|
+
(v) => !v.startsWith("/") && !v.includes("..") && !/[\x00-\x1f]|\.env|secret|credential/i.test(v)
|
|
235738
|
+
),
|
|
235739
|
+
line: external_exports.number().int().positive().optional(),
|
|
235740
|
+
symbol: external_exports.string().max(120).optional()
|
|
235741
|
+
}).strict();
|
|
235742
|
+
var componentSchema = external_exports.object({
|
|
235743
|
+
key: key2,
|
|
235744
|
+
name: external_exports.string().min(1).max(120),
|
|
235745
|
+
kind: external_exports.enum(["recurring", "usage", "one_time"]),
|
|
235746
|
+
productKey: external_exports.string().regex(/^prod_[A-Za-z0-9]+$/),
|
|
235747
|
+
prices: external_exports.array(
|
|
235748
|
+
external_exports.object({ key: external_exports.string().regex(/^price_[A-Za-z0-9]+$/) }).strict()
|
|
235749
|
+
).min(1).max(100),
|
|
235750
|
+
required: external_exports.boolean(),
|
|
235751
|
+
relatedFeatureKey: key2.optional(),
|
|
235752
|
+
includedQuantity: external_exports.number().finite().nonnegative().optional(),
|
|
235753
|
+
quantityBasis: external_exports.enum(["total", "additional"]).optional(),
|
|
235754
|
+
quantitySourceKey: key2.optional(),
|
|
235755
|
+
usageSourceKey: key2.optional(),
|
|
235756
|
+
provenance: external_exports.array(provenanceSchema).max(12).optional()
|
|
235757
|
+
}).strict();
|
|
235758
|
+
var developerAnswersSchema = external_exports.array(
|
|
235759
|
+
external_exports.object({
|
|
235760
|
+
id: external_exports.string().min(1).max(240),
|
|
235761
|
+
fingerprint: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
235762
|
+
disposition: external_exports.enum(["not_applicable", "unresolved", "configuration"]),
|
|
235763
|
+
configuration: external_exports.array(external_exports.object({
|
|
235764
|
+
planKey: key2,
|
|
235765
|
+
featureKey: key2.optional(),
|
|
235766
|
+
componentKey: key2.optional()
|
|
235767
|
+
}).strict().refine((v) => Boolean(v.featureKey) !== Boolean(v.componentKey), "Reference one feature or component.")).min(1).max(100).optional(),
|
|
235768
|
+
reason: external_exports.string().trim().min(3).max(1e3)
|
|
235769
|
+
}).strict()
|
|
235770
|
+
).max(100);
|
|
235771
|
+
|
|
235722
235772
|
// src/source-analysis.ts
|
|
235723
235773
|
var import_typescript = __toESM(require_typescript(), 1);
|
|
235724
235774
|
|
|
@@ -235808,7 +235858,7 @@ function validateFeatureCatalogManifest(value) {
|
|
|
235808
235858
|
|
|
235809
235859
|
// src/identity.ts
|
|
235810
235860
|
var SAASFUNNELS_CLI_NAME = "saasfunnels";
|
|
235811
|
-
var SAASFUNNELS_CLI_VERSION = "0.
|
|
235861
|
+
var SAASFUNNELS_CLI_VERSION = "0.4.1";
|
|
235812
235862
|
var SAASFUNNELS_PRODUCT_NAME = "SaaSFunnels";
|
|
235813
235863
|
var SAASFUNNELS_DEFAULT_API_BASE_URL = "https://app.saasfunnels.ai";
|
|
235814
235864
|
var SAASFUNNELS_ENV = Object.freeze({
|
|
@@ -236007,16 +236057,16 @@ function sanitizeString(value) {
|
|
|
236007
236057
|
}
|
|
236008
236058
|
return withoutSecrets;
|
|
236009
236059
|
}
|
|
236010
|
-
function sanitizeJson(value,
|
|
236060
|
+
function sanitizeJson(value, key3 = "", depth = 0) {
|
|
236011
236061
|
if (depth > 8) return "[truncated-depth]";
|
|
236012
236062
|
if (typeof value === "string") {
|
|
236013
|
-
if ((
|
|
236063
|
+
if ((key3 === "testToken" || key3 === "test_token") && /^fet1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{32,256}$/.test(value) && value.length <= 8192)
|
|
236014
236064
|
return value;
|
|
236015
|
-
if (sensitiveKeyPattern3.test(
|
|
236065
|
+
if (sensitiveKeyPattern3.test(key3)) return "[redacted]";
|
|
236016
236066
|
return sanitizeString(value);
|
|
236017
236067
|
}
|
|
236018
236068
|
if (Array.isArray(value))
|
|
236019
|
-
return value.slice(0, 50).map((item) => sanitizeJson(item,
|
|
236069
|
+
return value.slice(0, 50).map((item) => sanitizeJson(item, key3, depth + 1));
|
|
236020
236070
|
if (!value || typeof value !== "object") return value;
|
|
236021
236071
|
return Object.fromEntries(
|
|
236022
236072
|
Object.entries(value).slice(0, 100).map(([nestedKey, nestedValue]) => [
|
|
@@ -236030,8 +236080,8 @@ function saasFunnelsPublicValue(value) {
|
|
|
236030
236080
|
if (Array.isArray(value)) return value.map(saasFunnelsPublicValue);
|
|
236031
236081
|
if (!value || typeof value !== "object") return value;
|
|
236032
236082
|
return Object.fromEntries(
|
|
236033
|
-
Object.entries(value).map(([
|
|
236034
|
-
|
|
236083
|
+
Object.entries(value).map(([key3, nested]) => [
|
|
236084
|
+
key3,
|
|
236035
236085
|
saasFunnelsPublicValue(nested)
|
|
236036
236086
|
])
|
|
236037
236087
|
);
|
|
@@ -236816,8 +236866,8 @@ async function parseResponseJson(response) {
|
|
|
236816
236866
|
}
|
|
236817
236867
|
}
|
|
236818
236868
|
async function developerGet(path, args, options) {
|
|
236819
|
-
const
|
|
236820
|
-
const authorization = options.authorizationHeader ?? (
|
|
236869
|
+
const key3 = envValue(options, SAASFUNNELS_ENV.apiKey);
|
|
236870
|
+
const authorization = options.authorizationHeader ?? (key3 ? `Bearer ${key3}` : void 0);
|
|
236821
236871
|
if (!authorization) {
|
|
236822
236872
|
throw new McpToolExecutionError("Missing SAASFUNNELS_API_KEY.", {
|
|
236823
236873
|
error: "Missing SAASFUNNELS_API_KEY for live developer reads.",
|
|
@@ -236852,8 +236902,8 @@ async function developerGet(path, args, options) {
|
|
|
236852
236902
|
return body;
|
|
236853
236903
|
}
|
|
236854
236904
|
async function developerPost(path, args, body, options, requiredScope) {
|
|
236855
|
-
const
|
|
236856
|
-
const authorization = options.authorizationHeader ?? (
|
|
236905
|
+
const key3 = envValue(options, SAASFUNNELS_ENV.apiKey);
|
|
236906
|
+
const authorization = options.authorizationHeader ?? (key3 ? `Bearer ${key3}` : void 0);
|
|
236857
236907
|
if (!authorization) {
|
|
236858
236908
|
throw new McpToolExecutionError("Missing SAASFUNNELS_API_KEY.", {
|
|
236859
236909
|
error: "Missing SAASFUNNELS_API_KEY for this Funnel operation.",
|
|
@@ -236899,8 +236949,8 @@ async function sendTestEvent(args, options) {
|
|
|
236899
236949
|
schema_version: DEVELOPER_TOOLS_CONTRACT_SCHEMA_VERSION
|
|
236900
236950
|
});
|
|
236901
236951
|
}
|
|
236902
|
-
const
|
|
236903
|
-
if (!
|
|
236952
|
+
const key3 = envValue(options, SAASFUNNELS_ENV.ingestApiKey);
|
|
236953
|
+
if (!key3) {
|
|
236904
236954
|
throw new McpToolExecutionError("Missing SAASFUNNELS_INGEST_API_KEY.", {
|
|
236905
236955
|
error: "Missing SAASFUNNELS_INGEST_API_KEY for setup smoke event sends.",
|
|
236906
236956
|
ok: false,
|
|
@@ -236915,7 +236965,7 @@ async function sendTestEvent(args, options) {
|
|
|
236915
236965
|
{
|
|
236916
236966
|
body: JSON.stringify(payload),
|
|
236917
236967
|
headers: {
|
|
236918
|
-
authorization: `Bearer ${
|
|
236968
|
+
authorization: `Bearer ${key3}`,
|
|
236919
236969
|
"content-type": "application/json"
|
|
236920
236970
|
},
|
|
236921
236971
|
method: "POST"
|