saasfunnels 0.4.3 → 0.5.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 +7 -1
- package/dist/library.js +1 -1
- package/dist/saasfunnels.js +1118 -912
- package/dist/types/identity.d.ts +1 -1
- package/dist/types/mcp.d.ts +1 -1
- package/dist/types/setup-pricing.d.ts +2 -1
- package/package.json +1 -1
package/dist/saasfunnels.js
CHANGED
|
@@ -25,9 +25,9 @@ var __export = (target, all) => {
|
|
|
25
25
|
};
|
|
26
26
|
var __copyProps = (to, from, except, desc) => {
|
|
27
27
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
-
for (let
|
|
29
|
-
if (!__hasOwnProp.call(to,
|
|
30
|
-
__defProp(to,
|
|
28
|
+
for (let key4 of __getOwnPropNames(from))
|
|
29
|
+
if (!__hasOwnProp.call(to, key4) && key4 !== except)
|
|
30
|
+
__defProp(to, key4, { get: () => from[key4], enumerable: !(desc = __getOwnPropDesc(from, key4)) || desc.enumerable });
|
|
31
31
|
}
|
|
32
32
|
return to;
|
|
33
33
|
};
|
|
@@ -56,9 +56,9 @@ var require_typescript = __commonJS({
|
|
|
56
56
|
};
|
|
57
57
|
var __copyProps2 = (to, from, except, desc) => {
|
|
58
58
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
59
|
-
for (let
|
|
60
|
-
if (!__hasOwnProp2.call(to,
|
|
61
|
-
__defProp2(to,
|
|
59
|
+
for (let key4 of __getOwnPropNames2(from))
|
|
60
|
+
if (!__hasOwnProp2.call(to, key4) && key4 !== except)
|
|
61
|
+
__defProp2(to, key4, { get: () => from[key4], enumerable: !(desc = __getOwnPropDesc2(from, key4)) || desc.enumerable });
|
|
62
62
|
}
|
|
63
63
|
return to;
|
|
64
64
|
};
|
|
@@ -2648,12 +2648,12 @@ var require_typescript = __commonJS({
|
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
2650
|
}
|
|
2651
|
-
function getOrUpdate(map22,
|
|
2652
|
-
if (map22.has(
|
|
2653
|
-
return map22.get(
|
|
2651
|
+
function getOrUpdate(map22, key4, callback) {
|
|
2652
|
+
if (map22.has(key4)) {
|
|
2653
|
+
return map22.get(key4);
|
|
2654
2654
|
}
|
|
2655
2655
|
const value = callback();
|
|
2656
|
-
map22.set(
|
|
2656
|
+
map22.set(key4, value);
|
|
2657
2657
|
return value;
|
|
2658
2658
|
}
|
|
2659
2659
|
function tryAddToSet(set2, value) {
|
|
@@ -2672,16 +2672,16 @@ var require_typescript = __commonJS({
|
|
|
2672
2672
|
result3 = [];
|
|
2673
2673
|
const len = array2.length;
|
|
2674
2674
|
let previousKey;
|
|
2675
|
-
let
|
|
2675
|
+
let key4;
|
|
2676
2676
|
let start = 0;
|
|
2677
2677
|
let pos = 0;
|
|
2678
2678
|
while (start < len) {
|
|
2679
2679
|
while (pos < len) {
|
|
2680
2680
|
const value = array2[pos];
|
|
2681
|
-
|
|
2681
|
+
key4 = keyfn(value, pos);
|
|
2682
2682
|
if (pos === 0) {
|
|
2683
|
-
previousKey =
|
|
2684
|
-
} else if (
|
|
2683
|
+
previousKey = key4;
|
|
2684
|
+
} else if (key4 !== previousKey) {
|
|
2685
2685
|
break;
|
|
2686
2686
|
}
|
|
2687
2687
|
pos++;
|
|
@@ -2693,7 +2693,7 @@ var require_typescript = __commonJS({
|
|
|
2693
2693
|
}
|
|
2694
2694
|
start = pos;
|
|
2695
2695
|
}
|
|
2696
|
-
previousKey =
|
|
2696
|
+
previousKey = key4;
|
|
2697
2697
|
pos++;
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
@@ -2704,8 +2704,8 @@ var require_typescript = __commonJS({
|
|
|
2704
2704
|
return void 0;
|
|
2705
2705
|
}
|
|
2706
2706
|
const result3 = /* @__PURE__ */ new Map();
|
|
2707
|
-
map22.forEach((value,
|
|
2708
|
-
const [newKey, newValue] = f(
|
|
2707
|
+
map22.forEach((value, key4) => {
|
|
2708
|
+
const [newKey, newValue] = f(key4, value);
|
|
2709
2709
|
result3.set(newKey, newValue);
|
|
2710
2710
|
});
|
|
2711
2711
|
return result3;
|
|
@@ -3008,7 +3008,7 @@ var require_typescript = __commonJS({
|
|
|
3008
3008
|
function binarySearch(array2, value, keySelector, keyComparer, offset) {
|
|
3009
3009
|
return binarySearchKey(array2, keySelector(value), keySelector, keyComparer, offset);
|
|
3010
3010
|
}
|
|
3011
|
-
function binarySearchKey(array2,
|
|
3011
|
+
function binarySearchKey(array2, key4, keySelector, keyComparer, offset) {
|
|
3012
3012
|
if (!some(array2)) {
|
|
3013
3013
|
return -1;
|
|
3014
3014
|
}
|
|
@@ -3017,7 +3017,7 @@ var require_typescript = __commonJS({
|
|
|
3017
3017
|
while (low <= high) {
|
|
3018
3018
|
const middle = low + (high - low >> 1);
|
|
3019
3019
|
const midKey = keySelector(array2[middle], middle);
|
|
3020
|
-
switch (Math.sign(keyComparer(midKey,
|
|
3020
|
+
switch (Math.sign(keyComparer(midKey, key4))) {
|
|
3021
3021
|
case -1:
|
|
3022
3022
|
low = middle + 1;
|
|
3023
3023
|
break;
|
|
@@ -3053,17 +3053,17 @@ var require_typescript = __commonJS({
|
|
|
3053
3053
|
return initial;
|
|
3054
3054
|
}
|
|
3055
3055
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3056
|
-
function hasProperty(map22,
|
|
3057
|
-
return hasOwnProperty.call(map22,
|
|
3056
|
+
function hasProperty(map22, key4) {
|
|
3057
|
+
return hasOwnProperty.call(map22, key4);
|
|
3058
3058
|
}
|
|
3059
|
-
function getProperty(map22,
|
|
3060
|
-
return hasOwnProperty.call(map22,
|
|
3059
|
+
function getProperty(map22, key4) {
|
|
3060
|
+
return hasOwnProperty.call(map22, key4) ? map22[key4] : void 0;
|
|
3061
3061
|
}
|
|
3062
3062
|
function getOwnKeys(map22) {
|
|
3063
3063
|
const keys = [];
|
|
3064
|
-
for (const
|
|
3065
|
-
if (hasOwnProperty.call(map22,
|
|
3066
|
-
keys.push(
|
|
3064
|
+
for (const key4 in map22) {
|
|
3065
|
+
if (hasOwnProperty.call(map22, key4)) {
|
|
3066
|
+
keys.push(key4);
|
|
3067
3067
|
}
|
|
3068
3068
|
}
|
|
3069
3069
|
return keys;
|
|
@@ -3080,9 +3080,9 @@ var require_typescript = __commonJS({
|
|
|
3080
3080
|
}
|
|
3081
3081
|
function getOwnValues(collection) {
|
|
3082
3082
|
const values = [];
|
|
3083
|
-
for (const
|
|
3084
|
-
if (hasOwnProperty.call(collection,
|
|
3085
|
-
values.push(collection[
|
|
3083
|
+
for (const key4 in collection) {
|
|
3084
|
+
if (hasOwnProperty.call(collection, key4)) {
|
|
3085
|
+
values.push(collection[key4]);
|
|
3086
3086
|
}
|
|
3087
3087
|
}
|
|
3088
3088
|
return values;
|
|
@@ -3115,15 +3115,15 @@ var require_typescript = __commonJS({
|
|
|
3115
3115
|
function equalOwnProperties(left, right, equalityComparer = equateValues) {
|
|
3116
3116
|
if (left === right) return true;
|
|
3117
3117
|
if (!left || !right) return false;
|
|
3118
|
-
for (const
|
|
3119
|
-
if (hasOwnProperty.call(left,
|
|
3120
|
-
if (!hasOwnProperty.call(right,
|
|
3121
|
-
if (!equalityComparer(left[
|
|
3118
|
+
for (const key4 in left) {
|
|
3119
|
+
if (hasOwnProperty.call(left, key4)) {
|
|
3120
|
+
if (!hasOwnProperty.call(right, key4)) return false;
|
|
3121
|
+
if (!equalityComparer(left[key4], right[key4])) return false;
|
|
3122
3122
|
}
|
|
3123
3123
|
}
|
|
3124
|
-
for (const
|
|
3125
|
-
if (hasOwnProperty.call(right,
|
|
3126
|
-
if (!hasOwnProperty.call(left,
|
|
3124
|
+
for (const key4 in right) {
|
|
3125
|
+
if (hasOwnProperty.call(right, key4)) {
|
|
3126
|
+
if (!hasOwnProperty.call(left, key4)) return false;
|
|
3127
3127
|
}
|
|
3128
3128
|
}
|
|
3129
3129
|
return true;
|
|
@@ -3132,8 +3132,8 @@ var require_typescript = __commonJS({
|
|
|
3132
3132
|
const result3 = /* @__PURE__ */ new Map();
|
|
3133
3133
|
for (let i = 0; i < array2.length; i++) {
|
|
3134
3134
|
const value = array2[i];
|
|
3135
|
-
const
|
|
3136
|
-
if (
|
|
3135
|
+
const key4 = makeKey(value);
|
|
3136
|
+
if (key4 !== void 0) result3.set(key4, makeValue(value));
|
|
3137
3137
|
}
|
|
3138
3138
|
return result3;
|
|
3139
3139
|
}
|
|
@@ -3161,8 +3161,8 @@ var require_typescript = __commonJS({
|
|
|
3161
3161
|
if (values !== void 0) {
|
|
3162
3162
|
for (let i = 0; i < values.length; i++) {
|
|
3163
3163
|
const value = values[i];
|
|
3164
|
-
const
|
|
3165
|
-
const array2 = result3[
|
|
3164
|
+
const key4 = `${keySelector(value)}`;
|
|
3165
|
+
const array2 = result3[key4] ?? (result3[key4] = []);
|
|
3166
3166
|
array2.push(value);
|
|
3167
3167
|
}
|
|
3168
3168
|
}
|
|
@@ -3207,21 +3207,21 @@ var require_typescript = __commonJS({
|
|
|
3207
3207
|
map22.remove = multiMapRemove;
|
|
3208
3208
|
return map22;
|
|
3209
3209
|
}
|
|
3210
|
-
function multiMapAdd(
|
|
3211
|
-
let values = this.get(
|
|
3210
|
+
function multiMapAdd(key4, value) {
|
|
3211
|
+
let values = this.get(key4);
|
|
3212
3212
|
if (values !== void 0) {
|
|
3213
3213
|
values.push(value);
|
|
3214
3214
|
} else {
|
|
3215
|
-
this.set(
|
|
3215
|
+
this.set(key4, values = [value]);
|
|
3216
3216
|
}
|
|
3217
3217
|
return values;
|
|
3218
3218
|
}
|
|
3219
|
-
function multiMapRemove(
|
|
3220
|
-
const values = this.get(
|
|
3219
|
+
function multiMapRemove(key4, value) {
|
|
3220
|
+
const values = this.get(key4);
|
|
3221
3221
|
if (values !== void 0) {
|
|
3222
3222
|
unorderedRemoveItem(values, value);
|
|
3223
3223
|
if (!values.length) {
|
|
3224
|
-
this.delete(
|
|
3224
|
+
this.delete(key4);
|
|
3225
3225
|
}
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
@@ -3423,11 +3423,11 @@ var require_typescript = __commonJS({
|
|
|
3423
3423
|
function memoizeOne(callback) {
|
|
3424
3424
|
const map22 = /* @__PURE__ */ new Map();
|
|
3425
3425
|
return (arg) => {
|
|
3426
|
-
const
|
|
3427
|
-
let value = map22.get(
|
|
3428
|
-
if (value === void 0 && !map22.has(
|
|
3426
|
+
const key4 = `${typeof arg}:${arg}`;
|
|
3427
|
+
let value = map22.get(key4);
|
|
3428
|
+
if (value === void 0 && !map22.has(key4)) {
|
|
3429
3429
|
value = callback(arg);
|
|
3430
|
-
map22.set(
|
|
3430
|
+
map22.set(key4, value);
|
|
3431
3431
|
}
|
|
3432
3432
|
return value;
|
|
3433
3433
|
};
|
|
@@ -3517,8 +3517,8 @@ var require_typescript = __commonJS({
|
|
|
3517
3517
|
uiComparerCaseSensitive ?? (uiComparerCaseSensitive = createUIStringComparer(uiLocale));
|
|
3518
3518
|
return uiComparerCaseSensitive(a, b);
|
|
3519
3519
|
}
|
|
3520
|
-
function compareProperties(a, b,
|
|
3521
|
-
return a === b ? 0 : a === void 0 ? -1 : b === void 0 ? 1 : comparer(a[
|
|
3520
|
+
function compareProperties(a, b, key4, comparer) {
|
|
3521
|
+
return a === b ? 0 : a === void 0 ? -1 : b === void 0 ? 1 : comparer(a[key4], b[key4]);
|
|
3522
3522
|
}
|
|
3523
3523
|
function compareBooleans(a, b) {
|
|
3524
3524
|
return compareValues(a ? 1 : 0, b ? 1 : 0);
|
|
@@ -3858,11 +3858,11 @@ var require_typescript = __commonJS({
|
|
|
3858
3858
|
const prevAssertionLevel = currentAssertionLevel;
|
|
3859
3859
|
currentAssertionLevel = level;
|
|
3860
3860
|
if (level > prevAssertionLevel) {
|
|
3861
|
-
for (const
|
|
3862
|
-
const cachedFunc = assertionCache[
|
|
3863
|
-
if (cachedFunc !== void 0 && Debug2[
|
|
3864
|
-
Debug2[
|
|
3865
|
-
assertionCache[
|
|
3861
|
+
for (const key4 of getOwnKeys(assertionCache)) {
|
|
3862
|
+
const cachedFunc = assertionCache[key4];
|
|
3863
|
+
if (cachedFunc !== void 0 && Debug2[key4] !== cachedFunc.assertion && level >= cachedFunc.level) {
|
|
3864
|
+
Debug2[key4] = cachedFunc;
|
|
3865
|
+
assertionCache[key4] = void 0;
|
|
3866
3866
|
}
|
|
3867
3867
|
}
|
|
3868
3868
|
}
|
|
@@ -9499,8 +9499,8 @@ ${lanes.join("\n")}
|
|
|
9499
9499
|
function isNodeModulesDirectory(dirPath) {
|
|
9500
9500
|
return endsWith(dirPath, "/node_modules");
|
|
9501
9501
|
}
|
|
9502
|
-
function diag(code, category,
|
|
9503
|
-
return { code, category, key:
|
|
9502
|
+
function diag(code, category, key4, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated) {
|
|
9503
|
+
return { code, category, key: key4, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated };
|
|
9504
9504
|
}
|
|
9505
9505
|
var Diagnostics = {
|
|
9506
9506
|
Unterminated_string_literal: diag(1002, 1, "Unterminated_string_literal_1002", "Unterminated string literal."),
|
|
@@ -16791,8 +16791,8 @@ ${lanes.join("\n")}
|
|
|
16791
16791
|
}
|
|
16792
16792
|
function forEachEntry(map22, callback) {
|
|
16793
16793
|
const iterator = map22.entries();
|
|
16794
|
-
for (const [
|
|
16795
|
-
const result3 = callback(value,
|
|
16794
|
+
for (const [key4, value] of iterator) {
|
|
16795
|
+
const result3 = callback(value, key4);
|
|
16796
16796
|
if (result3) {
|
|
16797
16797
|
return result3;
|
|
16798
16798
|
}
|
|
@@ -16801,8 +16801,8 @@ ${lanes.join("\n")}
|
|
|
16801
16801
|
}
|
|
16802
16802
|
function forEachKey(map22, callback) {
|
|
16803
16803
|
const iterator = map22.keys();
|
|
16804
|
-
for (const
|
|
16805
|
-
const result3 = callback(
|
|
16804
|
+
for (const key4 of iterator) {
|
|
16805
|
+
const result3 = callback(key4);
|
|
16806
16806
|
if (result3) {
|
|
16807
16807
|
return result3;
|
|
16808
16808
|
}
|
|
@@ -16810,8 +16810,8 @@ ${lanes.join("\n")}
|
|
|
16810
16810
|
return void 0;
|
|
16811
16811
|
}
|
|
16812
16812
|
function copyEntries(source, target) {
|
|
16813
|
-
source.forEach((value,
|
|
16814
|
-
target.set(
|
|
16813
|
+
source.forEach((value, key4) => {
|
|
16814
|
+
target.set(key4, value);
|
|
16815
16815
|
});
|
|
16816
16816
|
}
|
|
16817
16817
|
function usingSingleLineStringWriter(action) {
|
|
@@ -18605,11 +18605,11 @@ ${lanes.join("\n")}
|
|
|
18605
18605
|
function isThisTypePredicate(predicate) {
|
|
18606
18606
|
return predicate && predicate.kind === 0;
|
|
18607
18607
|
}
|
|
18608
|
-
function forEachPropertyAssignment(objectLiteral,
|
|
18608
|
+
function forEachPropertyAssignment(objectLiteral, key4, callback, key22) {
|
|
18609
18609
|
return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property2) => {
|
|
18610
18610
|
if (!isPropertyAssignment(property2)) return void 0;
|
|
18611
18611
|
const propName = tryGetTextOfPropertyName(property2.name);
|
|
18612
|
-
return
|
|
18612
|
+
return key4 === propName || key22 && key22 === propName ? callback(property2) : void 0;
|
|
18613
18613
|
});
|
|
18614
18614
|
}
|
|
18615
18615
|
function getTsConfigObjectLiteralExpression(tsConfigSourceFile) {
|
|
@@ -22028,22 +22028,22 @@ ${lanes.join("\n")}
|
|
|
22028
22028
|
}
|
|
22029
22029
|
function mutateMapSkippingNewValues(map22, newMap, options) {
|
|
22030
22030
|
const { onDeleteValue, onExistingValue } = options;
|
|
22031
|
-
map22.forEach((existingValue,
|
|
22031
|
+
map22.forEach((existingValue, key4) => {
|
|
22032
22032
|
var _a3;
|
|
22033
|
-
if (!(newMap == null ? void 0 : newMap.has(
|
|
22034
|
-
map22.delete(
|
|
22035
|
-
onDeleteValue(existingValue,
|
|
22033
|
+
if (!(newMap == null ? void 0 : newMap.has(key4))) {
|
|
22034
|
+
map22.delete(key4);
|
|
22035
|
+
onDeleteValue(existingValue, key4);
|
|
22036
22036
|
} else if (onExistingValue) {
|
|
22037
|
-
onExistingValue(existingValue, (_a3 = newMap.get) == null ? void 0 : _a3.call(newMap,
|
|
22037
|
+
onExistingValue(existingValue, (_a3 = newMap.get) == null ? void 0 : _a3.call(newMap, key4), key4);
|
|
22038
22038
|
}
|
|
22039
22039
|
});
|
|
22040
22040
|
}
|
|
22041
22041
|
function mutateMap(map22, newMap, options) {
|
|
22042
22042
|
mutateMapSkippingNewValues(map22, newMap, options);
|
|
22043
22043
|
const { createNewValue } = options;
|
|
22044
|
-
newMap == null ? void 0 : newMap.forEach((valueInNewMap,
|
|
22045
|
-
if (!map22.has(
|
|
22046
|
-
map22.set(
|
|
22044
|
+
newMap == null ? void 0 : newMap.forEach((valueInNewMap, key4) => {
|
|
22045
|
+
if (!map22.has(key4)) {
|
|
22046
|
+
map22.set(key4, createNewValue(key4, valueInNewMap));
|
|
22047
22047
|
}
|
|
22048
22048
|
});
|
|
22049
22049
|
}
|
|
@@ -22085,11 +22085,11 @@ ${lanes.join("\n")}
|
|
|
22085
22085
|
});
|
|
22086
22086
|
return lastChild;
|
|
22087
22087
|
}
|
|
22088
|
-
function addToSeen(seen,
|
|
22089
|
-
if (seen.has(
|
|
22088
|
+
function addToSeen(seen, key4) {
|
|
22089
|
+
if (seen.has(key4)) {
|
|
22090
22090
|
return false;
|
|
22091
22091
|
}
|
|
22092
|
-
seen.add(
|
|
22092
|
+
seen.add(key4);
|
|
22093
22093
|
return true;
|
|
22094
22094
|
}
|
|
22095
22095
|
function isObjectTypeDeclaration(node) {
|
|
@@ -22862,7 +22862,7 @@ ${lanes.join("\n")}
|
|
|
22862
22862
|
return compilerOptions[flag] === void 0 ? compilerOptions.strict !== false : !!compilerOptions[flag];
|
|
22863
22863
|
}
|
|
22864
22864
|
function getNameOfScriptTarget(scriptTarget) {
|
|
22865
|
-
return forEachEntry(targetOptionDeclaration.type, (value,
|
|
22865
|
+
return forEachEntry(targetOptionDeclaration.type, (value, key4) => value === scriptTarget ? key4 : void 0);
|
|
22866
22866
|
}
|
|
22867
22867
|
function getEmitStandardClassFields(compilerOptions) {
|
|
22868
22868
|
return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9;
|
|
@@ -30138,11 +30138,11 @@ ${lanes.join("\n")}
|
|
|
30138
30138
|
clone22.flags |= node.flags & ~16;
|
|
30139
30139
|
clone22.transformFlags = node.transformFlags;
|
|
30140
30140
|
setOriginal(clone22, node);
|
|
30141
|
-
for (const
|
|
30142
|
-
if (hasProperty(clone22,
|
|
30141
|
+
for (const key4 in node) {
|
|
30142
|
+
if (hasProperty(clone22, key4) || !hasProperty(node, key4)) {
|
|
30143
30143
|
continue;
|
|
30144
30144
|
}
|
|
30145
|
-
clone22[
|
|
30145
|
+
clone22[key4] = node[key4];
|
|
30146
30146
|
}
|
|
30147
30147
|
return clone22;
|
|
30148
30148
|
}
|
|
@@ -30984,8 +30984,8 @@ ${lanes.join("\n")}
|
|
|
30984
30984
|
}
|
|
30985
30985
|
function mergeTokenSourceMapRanges(sourceRanges, destRanges) {
|
|
30986
30986
|
if (!destRanges) destRanges = [];
|
|
30987
|
-
for (const
|
|
30988
|
-
destRanges[
|
|
30987
|
+
for (const key4 in sourceRanges) {
|
|
30988
|
+
destRanges[key4] = sourceRanges[key4];
|
|
30989
30989
|
}
|
|
30990
30990
|
return destRanges;
|
|
30991
30991
|
}
|
|
@@ -43659,8 +43659,8 @@ ${lanes.join("\n")}
|
|
|
43659
43659
|
context.typeReferenceDirectives = [];
|
|
43660
43660
|
context.libReferenceDirectives = [];
|
|
43661
43661
|
context.amdDependencies = [];
|
|
43662
|
-
context.pragmas.forEach((entryOrList,
|
|
43663
|
-
switch (
|
|
43662
|
+
context.pragmas.forEach((entryOrList, key4) => {
|
|
43663
|
+
switch (key4) {
|
|
43664
43664
|
case "reference": {
|
|
43665
43665
|
const referencedFiles = context.referencedFiles;
|
|
43666
43666
|
const typeReferenceDirectives = context.typeReferenceDirectives;
|
|
@@ -43707,7 +43707,7 @@ ${lanes.join("\n")}
|
|
|
43707
43707
|
forEach(toArray(entryOrList), (entry) => {
|
|
43708
43708
|
if (!context.checkJsDirective || entry.range.pos > context.checkJsDirective.pos) {
|
|
43709
43709
|
context.checkJsDirective = {
|
|
43710
|
-
enabled:
|
|
43710
|
+
enabled: key4 === "ts-check",
|
|
43711
43711
|
end: entry.range.end,
|
|
43712
43712
|
pos: entry.range.pos
|
|
43713
43713
|
};
|
|
@@ -43842,7 +43842,7 @@ ${lanes.join("\n")}
|
|
|
43842
43842
|
"react": 2
|
|
43843
43843
|
/* React */
|
|
43844
43844
|
}));
|
|
43845
|
-
var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([
|
|
43845
|
+
var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key4, value]) => ["" + value, key4]));
|
|
43846
43846
|
var libEntries = [
|
|
43847
43847
|
// JavaScript only
|
|
43848
43848
|
["es5", "lib.es5.d.ts"],
|
|
@@ -45491,7 +45491,7 @@ ${lanes.join("\n")}
|
|
|
45491
45491
|
}
|
|
45492
45492
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
45493
45493
|
const namesOfType = arrayFrom(opt.type.keys());
|
|
45494
|
-
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((
|
|
45494
|
+
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key4) => `'${key4}'`).join(", ");
|
|
45495
45495
|
return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
|
|
45496
45496
|
}
|
|
45497
45497
|
function parseCustomTypeOption(opt, value, errors) {
|
|
@@ -46165,9 +46165,9 @@ ${lanes.join("\n")}
|
|
|
46165
46165
|
}
|
|
46166
46166
|
}
|
|
46167
46167
|
function getNameOfCompilerOptionValue(value, customTypeMap) {
|
|
46168
|
-
return forEachEntry(customTypeMap, (mapValue,
|
|
46168
|
+
return forEachEntry(customTypeMap, (mapValue, key4) => {
|
|
46169
46169
|
if (mapValue === value) {
|
|
46170
|
-
return
|
|
46170
|
+
return key4;
|
|
46171
46171
|
}
|
|
46172
46172
|
});
|
|
46173
46173
|
}
|
|
@@ -46704,11 +46704,11 @@ ${lanes.join("\n")}
|
|
|
46704
46704
|
function getSubstitutedMapLikeOfStringArrayWithConfigDirTemplate(mapLike, basePath) {
|
|
46705
46705
|
let result3;
|
|
46706
46706
|
const ownKeys = getOwnKeys(mapLike);
|
|
46707
|
-
ownKeys.forEach((
|
|
46708
|
-
if (!isArray(mapLike[
|
|
46709
|
-
const subStitution = getSubstitutedStringArrayWithConfigDirTemplate(mapLike[
|
|
46707
|
+
ownKeys.forEach((key4) => {
|
|
46708
|
+
if (!isArray(mapLike[key4])) return;
|
|
46709
|
+
const subStitution = getSubstitutedStringArrayWithConfigDirTemplate(mapLike[key4], basePath);
|
|
46710
46710
|
if (!subStitution) return;
|
|
46711
|
-
(result3 ?? (result3 = assign({}, mapLike)))[
|
|
46711
|
+
(result3 ?? (result3 = assign({}, mapLike)))[key4] = subStitution;
|
|
46712
46712
|
});
|
|
46713
46713
|
return result3;
|
|
46714
46714
|
}
|
|
@@ -47081,8 +47081,8 @@ ${lanes.join("\n")}
|
|
|
47081
47081
|
}
|
|
47082
47082
|
function convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile) {
|
|
47083
47083
|
if (isNullOrUndefined(value)) return void 0;
|
|
47084
|
-
const
|
|
47085
|
-
const val = opt.type.get(
|
|
47084
|
+
const key4 = value.toLowerCase();
|
|
47085
|
+
const val = opt.type.get(key4);
|
|
47086
47086
|
if (val !== void 0) {
|
|
47087
47087
|
return validateJsonOptionValue(opt, val, errors, valueExpression, sourceFile);
|
|
47088
47088
|
} else {
|
|
@@ -47146,9 +47146,9 @@ ${lanes.join("\n")}
|
|
|
47146
47146
|
continue;
|
|
47147
47147
|
}
|
|
47148
47148
|
removeWildcardFilesWithLowerPriorityExtension(file2, wildcardFileMap, supportedExtensions2, keyMapper);
|
|
47149
|
-
const
|
|
47150
|
-
if (!literalFileMap.has(
|
|
47151
|
-
wildcardFileMap.set(
|
|
47149
|
+
const key4 = keyMapper(file2);
|
|
47150
|
+
if (!literalFileMap.has(key4) && !wildcardFileMap.has(key4)) {
|
|
47151
|
+
wildcardFileMap.set(key4, file2);
|
|
47152
47152
|
}
|
|
47153
47153
|
}
|
|
47154
47154
|
}
|
|
@@ -47227,14 +47227,14 @@ ${lanes.join("\n")}
|
|
|
47227
47227
|
}
|
|
47228
47228
|
const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
|
|
47229
47229
|
if (match) {
|
|
47230
|
-
const { key:
|
|
47231
|
-
const existingPath = wildCardKeyToPath.get(
|
|
47230
|
+
const { key: key4, path: path2, flags } = match;
|
|
47231
|
+
const existingPath = wildCardKeyToPath.get(key4);
|
|
47232
47232
|
const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
|
|
47233
47233
|
if (existingFlags === void 0 || existingFlags < flags) {
|
|
47234
47234
|
wildcardDirectories[existingPath !== void 0 ? existingPath : path2] = flags;
|
|
47235
|
-
if (existingPath === void 0) wildCardKeyToPath.set(
|
|
47235
|
+
if (existingPath === void 0) wildCardKeyToPath.set(key4, path2);
|
|
47236
47236
|
if (flags === 1) {
|
|
47237
|
-
recursiveKeys.push(
|
|
47237
|
+
recursiveKeys.push(key4);
|
|
47238
47238
|
}
|
|
47239
47239
|
}
|
|
47240
47240
|
}
|
|
@@ -47242,8 +47242,8 @@ ${lanes.join("\n")}
|
|
|
47242
47242
|
for (const path2 in wildcardDirectories) {
|
|
47243
47243
|
if (hasProperty(wildcardDirectories, path2)) {
|
|
47244
47244
|
for (const recursiveKey of recursiveKeys) {
|
|
47245
|
-
const
|
|
47246
|
-
if (
|
|
47245
|
+
const key4 = toCanonicalKey(path2, useCaseSensitiveFileNames2);
|
|
47246
|
+
if (key4 !== recursiveKey && containsPath(recursiveKey, key4, basePath, !useCaseSensitiveFileNames2)) {
|
|
47247
47247
|
delete wildcardDirectories[path2];
|
|
47248
47248
|
}
|
|
47249
47249
|
}
|
|
@@ -47326,11 +47326,11 @@ ${lanes.join("\n")}
|
|
|
47326
47326
|
}
|
|
47327
47327
|
function convertCompilerOptionsForTelemetry(opts) {
|
|
47328
47328
|
const out = {};
|
|
47329
|
-
for (const
|
|
47330
|
-
if (hasProperty(opts,
|
|
47331
|
-
const type = getOptionFromName(
|
|
47329
|
+
for (const key4 in opts) {
|
|
47330
|
+
if (hasProperty(opts, key4)) {
|
|
47331
|
+
const type = getOptionFromName(key4);
|
|
47332
47332
|
if (type !== void 0) {
|
|
47333
|
-
out[
|
|
47333
|
+
out[key4] = getOptionValueWithEmptyStrings(opts[key4], type);
|
|
47334
47334
|
}
|
|
47335
47335
|
}
|
|
47336
47336
|
}
|
|
@@ -47538,9 +47538,9 @@ ${lanes.join("\n")}
|
|
|
47538
47538
|
const typesVersions = readPackageJsonTypesVersionsField(jsonContent, state);
|
|
47539
47539
|
if (typesVersions === void 0) return;
|
|
47540
47540
|
if (state.traceEnabled) {
|
|
47541
|
-
for (const
|
|
47542
|
-
if (hasProperty(typesVersions,
|
|
47543
|
-
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range,
|
|
47541
|
+
for (const key4 in typesVersions) {
|
|
47542
|
+
if (hasProperty(typesVersions, key4) && !VersionRange.tryParse(key4)) {
|
|
47543
|
+
trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, key4);
|
|
47544
47544
|
}
|
|
47545
47545
|
}
|
|
47546
47546
|
}
|
|
@@ -47563,14 +47563,14 @@ ${lanes.join("\n")}
|
|
|
47563
47563
|
var typeScriptVersion;
|
|
47564
47564
|
function getPackageJsonTypesVersionsPaths(typesVersions) {
|
|
47565
47565
|
if (!typeScriptVersion) typeScriptVersion = new Version(version2);
|
|
47566
|
-
for (const
|
|
47567
|
-
if (!hasProperty(typesVersions,
|
|
47568
|
-
const keyRange = VersionRange.tryParse(
|
|
47566
|
+
for (const key4 in typesVersions) {
|
|
47567
|
+
if (!hasProperty(typesVersions, key4)) continue;
|
|
47568
|
+
const keyRange = VersionRange.tryParse(key4);
|
|
47569
47569
|
if (keyRange === void 0) {
|
|
47570
47570
|
continue;
|
|
47571
47571
|
}
|
|
47572
47572
|
if (keyRange.test(typeScriptVersion)) {
|
|
47573
|
-
return { version:
|
|
47573
|
+
return { version: key4, paths: typesVersions[key4] };
|
|
47574
47574
|
}
|
|
47575
47575
|
}
|
|
47576
47576
|
}
|
|
@@ -47905,9 +47905,9 @@ ${lanes.join("\n")}
|
|
|
47905
47905
|
return `[${(_a3 = value.map((e) => compilerOptionValueToString(e))) == null ? void 0 : _a3.join(",")}]`;
|
|
47906
47906
|
}
|
|
47907
47907
|
let str = "{";
|
|
47908
|
-
for (const
|
|
47909
|
-
if (hasProperty(value,
|
|
47910
|
-
str += `${
|
|
47908
|
+
for (const key4 in value) {
|
|
47909
|
+
if (hasProperty(value, key4)) {
|
|
47910
|
+
str += `${key4}: ${compilerOptionValueToString(value[key4])}`;
|
|
47911
47911
|
}
|
|
47912
47912
|
}
|
|
47913
47913
|
return str + "}";
|
|
@@ -47955,16 +47955,16 @@ ${lanes.join("\n")}
|
|
|
47955
47955
|
function getOrCreateMap(redirectOptions, create) {
|
|
47956
47956
|
let result3 = redirectsMap.get(redirectOptions);
|
|
47957
47957
|
if (result3) return result3;
|
|
47958
|
-
const
|
|
47959
|
-
result3 = redirectsKeyToMap.get(
|
|
47958
|
+
const key4 = getRedirectsCacheKey(redirectOptions);
|
|
47959
|
+
result3 = redirectsKeyToMap.get(key4);
|
|
47960
47960
|
if (!result3) {
|
|
47961
47961
|
if (ownOptions) {
|
|
47962
47962
|
const ownKey = getRedirectsCacheKey(ownOptions);
|
|
47963
|
-
if (ownKey ===
|
|
47963
|
+
if (ownKey === key4) result3 = ownMap;
|
|
47964
47964
|
else if (!redirectsKeyToMap.has(ownKey)) redirectsKeyToMap.set(ownKey, ownMap);
|
|
47965
47965
|
}
|
|
47966
47966
|
if (create) result3 ?? (result3 = /* @__PURE__ */ new Map());
|
|
47967
|
-
if (result3) redirectsKeyToMap.set(
|
|
47967
|
+
if (result3) redirectsKeyToMap.set(key4, result3);
|
|
47968
47968
|
}
|
|
47969
47969
|
if (result3) redirectsMap.set(redirectOptions, result3);
|
|
47970
47970
|
return result3;
|
|
@@ -48004,12 +48004,12 @@ ${lanes.join("\n")}
|
|
|
48004
48004
|
return cache;
|
|
48005
48005
|
}
|
|
48006
48006
|
}
|
|
48007
|
-
function getOrCreateCache(cacheWithRedirects, redirectedReference,
|
|
48007
|
+
function getOrCreateCache(cacheWithRedirects, redirectedReference, key4, create) {
|
|
48008
48008
|
const cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
|
|
48009
|
-
let result3 = cache.get(
|
|
48009
|
+
let result3 = cache.get(key4);
|
|
48010
48010
|
if (!result3) {
|
|
48011
48011
|
result3 = create();
|
|
48012
|
-
cache.set(
|
|
48012
|
+
cache.set(key4, result3);
|
|
48013
48013
|
}
|
|
48014
48014
|
return result3;
|
|
48015
48015
|
}
|
|
@@ -48060,8 +48060,8 @@ ${lanes.join("\n")}
|
|
|
48060
48060
|
return underlying.has(getUnderlyingCacheKey(specifier, mode));
|
|
48061
48061
|
},
|
|
48062
48062
|
forEach(cb) {
|
|
48063
|
-
return underlying.forEach((elem,
|
|
48064
|
-
const [specifier, mode] = memoizedReverseKeys.get(
|
|
48063
|
+
return underlying.forEach((elem, key4) => {
|
|
48064
|
+
const [specifier, mode] = memoizedReverseKeys.get(key4);
|
|
48065
48065
|
return cb(elem, specifier, mode);
|
|
48066
48066
|
});
|
|
48067
48067
|
},
|
|
@@ -48988,8 +48988,8 @@ ${lanes.join("\n")}
|
|
|
48988
48988
|
loadEntrypointsFromTargetExports(target);
|
|
48989
48989
|
}
|
|
48990
48990
|
} else if (typeof exports2 === "object" && exports2 !== null && allKeysStartWithDot(exports2)) {
|
|
48991
|
-
for (const
|
|
48992
|
-
loadEntrypointsFromTargetExports(exports2[
|
|
48991
|
+
for (const key4 in exports2) {
|
|
48992
|
+
loadEntrypointsFromTargetExports(exports2[key4]);
|
|
48993
48993
|
}
|
|
48994
48994
|
} else {
|
|
48995
48995
|
loadEntrypointsFromTargetExports(exports2);
|
|
@@ -49045,9 +49045,9 @@ ${lanes.join("\n")}
|
|
|
49045
49045
|
}
|
|
49046
49046
|
}
|
|
49047
49047
|
} else if (typeof target === "object" && target !== null) {
|
|
49048
|
-
return forEach(getOwnKeys(target), (
|
|
49049
|
-
if (
|
|
49050
|
-
loadEntrypointsFromTargetExports(target[
|
|
49048
|
+
return forEach(getOwnKeys(target), (key4) => {
|
|
49049
|
+
if (key4 === "default" || contains(state.conditions, key4) || isApplicableVersionedTypesKey(state.conditions, key4)) {
|
|
49050
|
+
loadEntrypointsFromTargetExports(target[key4]);
|
|
49051
49051
|
return true;
|
|
49052
49052
|
}
|
|
49053
49053
|
});
|
|
@@ -49102,20 +49102,20 @@ ${lanes.join("\n")}
|
|
|
49102
49102
|
const packageDirectory = realPath(packageJsonInfo.packageDirectory, state.host, state.traceEnabled);
|
|
49103
49103
|
const nodeModules = packageDirectory.substring(0, packageDirectory.lastIndexOf("node_modules") + "node_modules".length) + directorySeparator;
|
|
49104
49104
|
let result3 = "";
|
|
49105
|
-
for (const
|
|
49106
|
-
if (hasProperty(peerDependencies,
|
|
49105
|
+
for (const key4 in peerDependencies) {
|
|
49106
|
+
if (hasProperty(peerDependencies, key4)) {
|
|
49107
49107
|
const peerPackageJson = getPackageJsonInfo(
|
|
49108
|
-
nodeModules +
|
|
49108
|
+
nodeModules + key4,
|
|
49109
49109
|
/*onlyRecordFailures*/
|
|
49110
49110
|
false,
|
|
49111
49111
|
state
|
|
49112
49112
|
);
|
|
49113
49113
|
if (peerPackageJson) {
|
|
49114
49114
|
const version22 = peerPackageJson.contents.packageJsonContent.version;
|
|
49115
|
-
result3 += `+${
|
|
49116
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version,
|
|
49115
|
+
result3 += `+${key4}@${version22}`;
|
|
49116
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Found_peerDependency_0_with_1_version, key4, version22);
|
|
49117
49117
|
} else {
|
|
49118
|
-
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0,
|
|
49118
|
+
if (state.traceEnabled) trace(state.host, Diagnostics.Failed_to_find_peerDependency_0, key4);
|
|
49119
49119
|
}
|
|
49120
49120
|
}
|
|
49121
49121
|
}
|
|
@@ -49455,7 +49455,7 @@ ${lanes.join("\n")}
|
|
|
49455
49455
|
}
|
|
49456
49456
|
function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
49457
49457
|
return loadModuleFromTargetExportOrImport;
|
|
49458
|
-
function loadModuleFromTargetExportOrImport(target, subpath, pattern,
|
|
49458
|
+
function loadModuleFromTargetExportOrImport(target, subpath, pattern, key4) {
|
|
49459
49459
|
var _a3, _b;
|
|
49460
49460
|
if (typeof target === "string") {
|
|
49461
49461
|
if (!pattern && subpath.length > 0 && !endsWith(target, "/")) {
|
|
@@ -49470,7 +49470,7 @@ ${lanes.join("\n")}
|
|
|
49470
49470
|
if (!startsWith(target, "./")) {
|
|
49471
49471
|
if (isImports && !startsWith(target, "../") && !startsWith(target, "/") && !isRootedDiskPath(target)) {
|
|
49472
49472
|
const combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
|
|
49473
|
-
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports",
|
|
49473
|
+
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key4, combinedLookup);
|
|
49474
49474
|
traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
|
|
49475
49475
|
const result3 = nodeModuleNameResolverWorker(
|
|
49476
49476
|
state.features,
|
|
@@ -49528,7 +49528,7 @@ ${lanes.join("\n")}
|
|
|
49528
49528
|
);
|
|
49529
49529
|
}
|
|
49530
49530
|
if (state.traceEnabled) {
|
|
49531
|
-
trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports",
|
|
49531
|
+
trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key4, pattern ? target.replace(/\*/g, subpath) : target + subpath);
|
|
49532
49532
|
}
|
|
49533
49533
|
const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath);
|
|
49534
49534
|
const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports);
|
|
@@ -49548,7 +49548,7 @@ ${lanes.join("\n")}
|
|
|
49548
49548
|
if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) {
|
|
49549
49549
|
traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition);
|
|
49550
49550
|
const subTarget = target[condition];
|
|
49551
|
-
const result3 = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern,
|
|
49551
|
+
const result3 = loadModuleFromTargetExportOrImport(subTarget, subpath, pattern, key4);
|
|
49552
49552
|
if (result3) {
|
|
49553
49553
|
if (result3.value) {
|
|
49554
49554
|
traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition);
|
|
@@ -49575,7 +49575,7 @@ ${lanes.join("\n")}
|
|
|
49575
49575
|
);
|
|
49576
49576
|
}
|
|
49577
49577
|
for (const elem of target) {
|
|
49578
|
-
const result3 = loadModuleFromTargetExportOrImport(elem, subpath, pattern,
|
|
49578
|
+
const result3 = loadModuleFromTargetExportOrImport(elem, subpath, pattern, key4);
|
|
49579
49579
|
if (result3) {
|
|
49580
49580
|
return result3;
|
|
49581
49581
|
}
|
|
@@ -49687,10 +49687,10 @@ ${lanes.join("\n")}
|
|
|
49687
49687
|
}
|
|
49688
49688
|
}
|
|
49689
49689
|
}
|
|
49690
|
-
function isApplicableVersionedTypesKey(conditions,
|
|
49690
|
+
function isApplicableVersionedTypesKey(conditions, key4) {
|
|
49691
49691
|
if (!conditions.includes("types")) return false;
|
|
49692
|
-
if (!startsWith(
|
|
49693
|
-
const range = VersionRange.tryParse(
|
|
49692
|
+
if (!startsWith(key4, "types@")) return false;
|
|
49693
|
+
const range = VersionRange.tryParse(key4.substring("types@".length));
|
|
49694
49694
|
if (!range) return false;
|
|
49695
49695
|
return range.test(version2);
|
|
49696
49696
|
}
|
|
@@ -54131,8 +54131,8 @@ ${lanes.join("\n")}
|
|
|
54131
54131
|
}
|
|
54132
54132
|
}
|
|
54133
54133
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) {
|
|
54134
|
-
for (const
|
|
54135
|
-
for (const patternText2 of paths[
|
|
54134
|
+
for (const key4 in paths) {
|
|
54135
|
+
for (const patternText2 of paths[key4]) {
|
|
54136
54136
|
const normalized = normalizePath(patternText2);
|
|
54137
54137
|
const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized;
|
|
54138
54138
|
const indexOfStar = pattern.indexOf("*");
|
|
@@ -54150,12 +54150,12 @@ ${lanes.join("\n")}
|
|
|
54150
54150
|
if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
|
|
54151
54151
|
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
|
54152
54152
|
if (!pathIsRelative(matchedStar)) {
|
|
54153
|
-
return replaceFirstStar(
|
|
54153
|
+
return replaceFirstStar(key4, matchedStar);
|
|
54154
54154
|
}
|
|
54155
54155
|
}
|
|
54156
54156
|
}
|
|
54157
54157
|
} else if (some(candidates, (c) => c.ending !== 0 && pattern === c.value) || some(candidates, (c) => c.ending === 0 && pattern === c.value && validateEnding(c))) {
|
|
54158
|
-
return
|
|
54158
|
+
return key4;
|
|
54159
54159
|
}
|
|
54160
54160
|
}
|
|
54161
54161
|
}
|
|
@@ -54272,9 +54272,9 @@ ${lanes.join("\n")}
|
|
|
54272
54272
|
} else if (Array.isArray(exports2)) {
|
|
54273
54273
|
return forEach(exports2, (e) => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports, preferTsExtension));
|
|
54274
54274
|
} else if (typeof exports2 === "object" && exports2 !== null) {
|
|
54275
|
-
for (const
|
|
54276
|
-
if (
|
|
54277
|
-
const subTarget = exports2[
|
|
54275
|
+
for (const key4 of getOwnKeys(exports2)) {
|
|
54276
|
+
if (key4 === "default" || conditions.indexOf(key4) >= 0 || isApplicableVersionedTypesKey(conditions, key4)) {
|
|
54277
|
+
const subTarget = exports2[key4];
|
|
54278
54278
|
const result3 = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports, preferTsExtension);
|
|
54279
54279
|
if (result3) {
|
|
54280
54280
|
return result3;
|
|
@@ -55899,11 +55899,11 @@ ${lanes.join("\n")}
|
|
|
55899
55899
|
if (!isIdentifier(node.expression.expression)) return false;
|
|
55900
55900
|
return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol;
|
|
55901
55901
|
}
|
|
55902
|
-
function getCachedType(
|
|
55903
|
-
return
|
|
55902
|
+
function getCachedType(key4) {
|
|
55903
|
+
return key4 ? cachedTypes.get(key4) : void 0;
|
|
55904
55904
|
}
|
|
55905
|
-
function setCachedType(
|
|
55906
|
-
if (
|
|
55905
|
+
function setCachedType(key4, type) {
|
|
55906
|
+
if (key4) cachedTypes.set(key4, type);
|
|
55907
55907
|
return type;
|
|
55908
55908
|
}
|
|
55909
55909
|
function getJsxNamespace(location) {
|
|
@@ -55990,9 +55990,9 @@ ${lanes.join("\n")}
|
|
|
55990
55990
|
return diagnostic;
|
|
55991
55991
|
}
|
|
55992
55992
|
}
|
|
55993
|
-
function errorSkippedOn(
|
|
55993
|
+
function errorSkippedOn(key4, location, message, ...args) {
|
|
55994
55994
|
const diagnostic = error210(location, message, ...args);
|
|
55995
|
-
diagnostic.skippedOn =
|
|
55995
|
+
diagnostic.skippedOn = key4;
|
|
55996
55996
|
return diagnostic;
|
|
55997
55997
|
}
|
|
55998
55998
|
function createError(location, message, ...args) {
|
|
@@ -56303,9 +56303,9 @@ ${lanes.join("\n")}
|
|
|
56303
56303
|
"resolvedExports"
|
|
56304
56304
|
/* resolvedExports */
|
|
56305
56305
|
);
|
|
56306
|
-
for (const [
|
|
56307
|
-
if (resolvedExports.has(
|
|
56308
|
-
mergeSymbol(resolvedExports.get(
|
|
56306
|
+
for (const [key4, value] of arrayFrom(moduleAugmentation.symbol.exports.entries())) {
|
|
56307
|
+
if (resolvedExports.has(key4) && !mainModule.exports.has(key4)) {
|
|
56308
|
+
mergeSymbol(resolvedExports.get(key4), value);
|
|
56309
56309
|
}
|
|
56310
56310
|
}
|
|
56311
56311
|
}
|
|
@@ -58321,9 +58321,9 @@ ${lanes.join("\n")}
|
|
|
58321
58321
|
}
|
|
58322
58322
|
function forEachExportAndPropertyOfModule(moduleSymbol, cb) {
|
|
58323
58323
|
const exports2 = getExportsOfModule(moduleSymbol);
|
|
58324
|
-
exports2.forEach((symbol2,
|
|
58325
|
-
if (!isReservedMemberName(
|
|
58326
|
-
cb(symbol2,
|
|
58324
|
+
exports2.forEach((symbol2, key4) => {
|
|
58325
|
+
if (!isReservedMemberName(key4)) {
|
|
58326
|
+
cb(symbol2, key4);
|
|
58327
58327
|
}
|
|
58328
58328
|
});
|
|
58329
58329
|
const exportEquals = resolveExternalModuleSymbol(moduleSymbol);
|
|
@@ -58657,11 +58657,11 @@ ${lanes.join("\n")}
|
|
|
58657
58657
|
return type;
|
|
58658
58658
|
}
|
|
58659
58659
|
function checkIntrinsicName(name, debug) {
|
|
58660
|
-
const
|
|
58661
|
-
if (seenIntrinsicNames.has(
|
|
58660
|
+
const key4 = `${name},${debug ?? ""}`;
|
|
58661
|
+
if (seenIntrinsicNames.has(key4)) {
|
|
58662
58662
|
Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
|
|
58663
58663
|
}
|
|
58664
|
-
seenIntrinsicNames.add(
|
|
58664
|
+
seenIntrinsicNames.add(key4);
|
|
58665
58665
|
}
|
|
58666
58666
|
function createObjectType(objectFlags, symbol2) {
|
|
58667
58667
|
const type = createTypeWithSymbol(1048576, symbol2);
|
|
@@ -58802,9 +58802,9 @@ ${lanes.join("\n")}
|
|
|
58802
58802
|
case 232:
|
|
58803
58803
|
case 265:
|
|
58804
58804
|
let table;
|
|
58805
|
-
(getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol,
|
|
58805
|
+
(getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key4) => {
|
|
58806
58806
|
if (memberSymbol.flags & (788968 & ~67108864)) {
|
|
58807
|
-
(table || (table = createSymbolTable())).set(
|
|
58807
|
+
(table || (table = createSymbolTable())).set(key4, memberSymbol);
|
|
58808
58808
|
}
|
|
58809
58809
|
});
|
|
58810
58810
|
if (table && (result3 = callback(
|
|
@@ -58838,9 +58838,9 @@ ${lanes.join("\n")}
|
|
|
58838
58838
|
const links = getSymbolLinks(symbol2);
|
|
58839
58839
|
const cache = links.accessibleChainCache || (links.accessibleChainCache = /* @__PURE__ */ new Map());
|
|
58840
58840
|
const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node);
|
|
58841
|
-
const
|
|
58842
|
-
if (cache.has(
|
|
58843
|
-
return cache.get(
|
|
58841
|
+
const key4 = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation ? getNodeId(firstRelevantLocation) : 0}|${meaning}`;
|
|
58842
|
+
if (cache.has(key4)) {
|
|
58843
|
+
return cache.get(key4);
|
|
58844
58844
|
}
|
|
58845
58845
|
const id = getSymbolId(symbol2);
|
|
58846
58846
|
let visitedSymbolTables = visitedSymbolTablesMap.get(id);
|
|
@@ -58848,7 +58848,7 @@ ${lanes.join("\n")}
|
|
|
58848
58848
|
visitedSymbolTablesMap.set(id, visitedSymbolTables = []);
|
|
58849
58849
|
}
|
|
58850
58850
|
const result3 = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
|
|
58851
|
-
cache.set(
|
|
58851
|
+
cache.set(key4, result3);
|
|
58852
58852
|
return result3;
|
|
58853
58853
|
function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification, isLocalNameLookup) {
|
|
58854
58854
|
if (!pushIfUnique(visitedSymbolTables, symbols)) {
|
|
@@ -60509,11 +60509,11 @@ ${lanes.join("\n")}
|
|
|
60509
60509
|
context.symbolDepth = /* @__PURE__ */ new Map();
|
|
60510
60510
|
}
|
|
60511
60511
|
const links = context.maxExpansionDepth >= 0 ? void 0 : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
|
|
60512
|
-
const
|
|
60512
|
+
const key4 = `${getTypeId(type2)}|${context.flags}|${context.internalFlags}`;
|
|
60513
60513
|
if (links) {
|
|
60514
60514
|
links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map());
|
|
60515
60515
|
}
|
|
60516
|
-
const cachedResult = (_a22 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a22.get(
|
|
60516
|
+
const cachedResult = (_a22 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a22.get(key4);
|
|
60517
60517
|
if (cachedResult) {
|
|
60518
60518
|
(_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach(
|
|
60519
60519
|
([symbol2, enclosingDeclaration, meaning]) => context.tracker.trackSymbol(
|
|
@@ -60543,7 +60543,7 @@ ${lanes.join("\n")}
|
|
|
60543
60543
|
const result3 = transform22(type2);
|
|
60544
60544
|
const addedLength = context.approximateLength - startLength;
|
|
60545
60545
|
if (!context.reportedDiagnostic && !context.encounteredError) {
|
|
60546
|
-
(_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(
|
|
60546
|
+
(_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key4, {
|
|
60547
60547
|
node: result3,
|
|
60548
60548
|
truncating: context.truncating,
|
|
60549
60549
|
addedLength,
|
|
@@ -67126,8 +67126,8 @@ ${lanes.join("\n")}
|
|
|
67126
67126
|
if (!signature.optionalCallSignatureCache) {
|
|
67127
67127
|
signature.optionalCallSignatureCache = {};
|
|
67128
67128
|
}
|
|
67129
|
-
const
|
|
67130
|
-
return signature.optionalCallSignatureCache[
|
|
67129
|
+
const key4 = callChainFlags === 8 ? "inner" : "outer";
|
|
67130
|
+
return signature.optionalCallSignatureCache[key4] || (signature.optionalCallSignatureCache[key4] = createOptionalCallSignature(signature, callChainFlags));
|
|
67131
67131
|
}
|
|
67132
67132
|
function createOptionalCallSignature(signature, callChainFlags) {
|
|
67133
67133
|
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.");
|
|
@@ -68343,8 +68343,8 @@ ${lanes.join("\n")}
|
|
|
68343
68343
|
true
|
|
68344
68344
|
));
|
|
68345
68345
|
}
|
|
68346
|
-
const
|
|
68347
|
-
return getCachedType(
|
|
68346
|
+
const key4 = `I${getTypeId(type)},${getTypeId(thisArgument)}`;
|
|
68347
|
+
return getCachedType(key4) ?? setCachedType(key4, getTypeWithThisArgument(
|
|
68348
68348
|
type,
|
|
68349
68349
|
thisArgument,
|
|
68350
68350
|
/*needApparentType*/
|
|
@@ -70556,10 +70556,10 @@ ${lanes.join("\n")}
|
|
|
70556
70556
|
if (elementFlags.length === 1 && elementFlags[0] & 4) {
|
|
70557
70557
|
return readonly2 ? globalReadonlyArrayType : globalArrayType;
|
|
70558
70558
|
}
|
|
70559
|
-
const
|
|
70560
|
-
let type = tupleTypes.get(
|
|
70559
|
+
const key4 = map2(elementFlags, (f) => f & 1 ? "#" : f & 2 ? "?" : f & 4 ? "." : "*").join() + (readonly2 ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map2(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : "");
|
|
70560
|
+
let type = tupleTypes.get(key4);
|
|
70561
70561
|
if (!type) {
|
|
70562
|
-
tupleTypes.set(
|
|
70562
|
+
tupleTypes.set(key4, type = createTupleTargetType(elementFlags, readonly2, namedMemberDeclarations));
|
|
70563
70563
|
}
|
|
70564
70564
|
return type;
|
|
70565
70565
|
}
|
|
@@ -72601,14 +72601,14 @@ ${lanes.join("\n")}
|
|
|
72601
72601
|
}
|
|
72602
72602
|
function getBigIntLiteralType(value) {
|
|
72603
72603
|
let type;
|
|
72604
|
-
const
|
|
72605
|
-
return bigIntLiteralTypes.get(
|
|
72604
|
+
const key4 = pseudoBigIntToString(value);
|
|
72605
|
+
return bigIntLiteralTypes.get(key4) || (bigIntLiteralTypes.set(key4, type = createLiteralType(4096, value)), type);
|
|
72606
72606
|
}
|
|
72607
72607
|
function getEnumLiteralType(value, enumId, symbol2) {
|
|
72608
72608
|
let type;
|
|
72609
|
-
const
|
|
72609
|
+
const key4 = `${enumId}${typeof value === "string" ? "@" : "#"}${value}`;
|
|
72610
72610
|
const flags = 32768 | (typeof value === "string" ? 1024 : 2048);
|
|
72611
|
-
return enumLiteralTypes.get(
|
|
72611
|
+
return enumLiteralTypes.get(key4) || (enumLiteralTypes.set(key4, type = createLiteralType(flags, value, symbol2)), type);
|
|
72612
72612
|
}
|
|
72613
72613
|
function getTypeFromLiteralTypeNode(node) {
|
|
72614
72614
|
if (node.literal.kind === 106) {
|
|
@@ -73140,8 +73140,8 @@ ${lanes.join("\n")}
|
|
|
73140
73140
|
);
|
|
73141
73141
|
return isErrorType(elementType) ? errorType : createArrayType(elementType, getModifiedReadonlyState(isReadonlyArrayType(arrayType), getMappedTypeModifiers(mappedType)));
|
|
73142
73142
|
}
|
|
73143
|
-
function instantiateMappedTypeTemplate(type,
|
|
73144
|
-
const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type),
|
|
73143
|
+
function instantiateMappedTypeTemplate(type, key4, isOptional, mapper) {
|
|
73144
|
+
const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type), key4);
|
|
73145
73145
|
const propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper);
|
|
73146
73146
|
const modifiers = getMappedTypeModifiers(type);
|
|
73147
73147
|
return strictNullChecks && modifiers & 4 && !maybeTypeOfKind(
|
|
@@ -73220,9 +73220,9 @@ ${lanes.join("\n")}
|
|
|
73220
73220
|
if (index === -1) {
|
|
73221
73221
|
pushActiveMapper(mapper);
|
|
73222
73222
|
}
|
|
73223
|
-
const
|
|
73223
|
+
const key4 = type.id + getAliasId(aliasSymbol, aliasTypeArguments);
|
|
73224
73224
|
const mapperCache = activeTypeMappersCaches[index !== -1 ? index : activeTypeMappersCount - 1];
|
|
73225
|
-
const cached2 = mapperCache.get(
|
|
73225
|
+
const cached2 = mapperCache.get(key4);
|
|
73226
73226
|
if (cached2) {
|
|
73227
73227
|
return cached2;
|
|
73228
73228
|
}
|
|
@@ -73233,7 +73233,7 @@ ${lanes.join("\n")}
|
|
|
73233
73233
|
if (index === -1) {
|
|
73234
73234
|
popActiveMapper();
|
|
73235
73235
|
} else {
|
|
73236
|
-
mapperCache.set(
|
|
73236
|
+
mapperCache.set(key4, result3);
|
|
73237
73237
|
}
|
|
73238
73238
|
instantiationDepth--;
|
|
73239
73239
|
return result3;
|
|
@@ -77489,8 +77489,8 @@ ${lanes.join("\n")}
|
|
|
77489
77489
|
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;
|
|
77490
77490
|
}
|
|
77491
77491
|
function getBaseTypeOfLiteralTypeUnion(type) {
|
|
77492
|
-
const
|
|
77493
|
-
return getCachedType(
|
|
77492
|
+
const key4 = `B${getTypeId(type)}`;
|
|
77493
|
+
return getCachedType(key4) ?? setCachedType(key4, mapType(type, getBaseTypeOfLiteralType));
|
|
77494
77494
|
}
|
|
77495
77495
|
function getBaseTypeOfLiteralTypeForComparison(type) {
|
|
77496
77496
|
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;
|
|
@@ -78620,14 +78620,14 @@ ${lanes.join("\n")}
|
|
|
78620
78620
|
priority = savePriority;
|
|
78621
78621
|
}
|
|
78622
78622
|
function invokeOnce(source, target, action) {
|
|
78623
|
-
const
|
|
78624
|
-
const status = visited && visited.get(
|
|
78623
|
+
const key4 = source.id + "," + target.id;
|
|
78624
|
+
const status = visited && visited.get(key4);
|
|
78625
78625
|
if (status !== void 0) {
|
|
78626
78626
|
inferencePriority = Math.min(inferencePriority, status);
|
|
78627
78627
|
return;
|
|
78628
78628
|
}
|
|
78629
78629
|
(visited || (visited = /* @__PURE__ */ new Map())).set(
|
|
78630
|
-
|
|
78630
|
+
key4,
|
|
78631
78631
|
-1
|
|
78632
78632
|
/* Circularity */
|
|
78633
78633
|
);
|
|
@@ -78646,7 +78646,7 @@ ${lanes.join("\n")}
|
|
|
78646
78646
|
targetStack.pop();
|
|
78647
78647
|
sourceStack.pop();
|
|
78648
78648
|
expandingFlags = saveExpandingFlags;
|
|
78649
|
-
visited.set(
|
|
78649
|
+
visited.set(key4, inferencePriority);
|
|
78650
78650
|
inferencePriority = Math.min(inferencePriority, saveInferencePriority);
|
|
78651
78651
|
}
|
|
78652
78652
|
function inferFromMatchingTypes(sources, targets, matches) {
|
|
@@ -79272,14 +79272,14 @@ ${lanes.join("\n")}
|
|
|
79272
79272
|
case 213:
|
|
79273
79273
|
const propName = getAccessedPropertyName(node);
|
|
79274
79274
|
if (propName !== void 0) {
|
|
79275
|
-
const
|
|
79276
|
-
return
|
|
79275
|
+
const key4 = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
79276
|
+
return key4 && `${key4}.${propName}`;
|
|
79277
79277
|
}
|
|
79278
79278
|
if (isElementAccessExpression(node) && isIdentifier(node.argumentExpression)) {
|
|
79279
79279
|
const symbol2 = getResolvedSymbol(node.argumentExpression);
|
|
79280
79280
|
if (isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2)) {
|
|
79281
|
-
const
|
|
79282
|
-
return
|
|
79281
|
+
const key4 = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
|
|
79282
|
+
return key4 && `${key4}.@${getSymbolId(symbol2)}`;
|
|
79283
79283
|
}
|
|
79284
79284
|
}
|
|
79285
79285
|
break;
|
|
@@ -79527,8 +79527,8 @@ ${lanes.join("\n")}
|
|
|
79527
79527
|
if (assignedType.flags & 262144) {
|
|
79528
79528
|
return assignedType;
|
|
79529
79529
|
}
|
|
79530
|
-
const
|
|
79531
|
-
return getCachedType(
|
|
79530
|
+
const key4 = `A${getTypeId(declaredType)},${getTypeId(assignedType)}`;
|
|
79531
|
+
return getCachedType(key4) ?? setCachedType(key4, getAssignmentReducedTypeWorker(declaredType, assignedType));
|
|
79532
79532
|
}
|
|
79533
79533
|
function getAssignmentReducedTypeWorker(declaredType, assignedType) {
|
|
79534
79534
|
const filteredType = filterType(declaredType, (t) => typeMaybeAssignableTo(assignedType, t));
|
|
@@ -80304,7 +80304,7 @@ ${lanes.join("\n")}
|
|
|
80304
80304
|
return false;
|
|
80305
80305
|
}
|
|
80306
80306
|
function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a3) => (_a3 = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a3.flowNode)()) {
|
|
80307
|
-
let
|
|
80307
|
+
let key4;
|
|
80308
80308
|
let isKeySet = false;
|
|
80309
80309
|
let flowDepth = 0;
|
|
80310
80310
|
if (flowAnalysisDisabled) {
|
|
@@ -80328,10 +80328,10 @@ ${lanes.join("\n")}
|
|
|
80328
80328
|
return resultType;
|
|
80329
80329
|
function getOrSetCacheKey() {
|
|
80330
80330
|
if (isKeySet) {
|
|
80331
|
-
return
|
|
80331
|
+
return key4;
|
|
80332
80332
|
}
|
|
80333
80333
|
isKeySet = true;
|
|
80334
|
-
return
|
|
80334
|
+
return key4 = getFlowCacheKey(reference, declaredType, initialType, flowContainer);
|
|
80335
80335
|
}
|
|
80336
80336
|
function getTypeAtFlowNode(flow) {
|
|
80337
80337
|
var _a22;
|
|
@@ -83508,9 +83508,9 @@ ${lanes.join("\n")}
|
|
|
83508
83508
|
return false;
|
|
83509
83509
|
}
|
|
83510
83510
|
function discriminateContextualTypeByObjectMembers(node, contextualType) {
|
|
83511
|
-
const
|
|
83512
|
-
return getCachedType(
|
|
83513
|
-
|
|
83511
|
+
const key4 = `D${getNodeId(node)},${getTypeId(contextualType)}`;
|
|
83512
|
+
return getCachedType(key4) ?? setCachedType(
|
|
83513
|
+
key4,
|
|
83514
83514
|
getMatchingUnionConstituentForObjectLiteral(contextualType, node) ?? discriminateTypeByDiscriminableItems(
|
|
83515
83515
|
contextualType,
|
|
83516
83516
|
concatenate(
|
|
@@ -83542,12 +83542,12 @@ ${lanes.join("\n")}
|
|
|
83542
83542
|
);
|
|
83543
83543
|
}
|
|
83544
83544
|
function discriminateContextualTypeByJSXAttributes(node, contextualType) {
|
|
83545
|
-
const
|
|
83546
|
-
const cached2 = getCachedType(
|
|
83545
|
+
const key4 = `D${getNodeId(node)},${getTypeId(contextualType)}`;
|
|
83546
|
+
const cached2 = getCachedType(key4);
|
|
83547
83547
|
if (cached2) return cached2;
|
|
83548
83548
|
const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
|
|
83549
83549
|
return setCachedType(
|
|
83550
|
-
|
|
83550
|
+
key4,
|
|
83551
83551
|
discriminateTypeByDiscriminableItems(
|
|
83552
83552
|
contextualType,
|
|
83553
83553
|
concatenate(
|
|
@@ -85713,11 +85713,11 @@ ${lanes.join("\n")}
|
|
|
85713
85713
|
function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
|
|
85714
85714
|
const links = getNodeLinks(propNode);
|
|
85715
85715
|
const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set());
|
|
85716
|
-
const
|
|
85717
|
-
if (cache.has(
|
|
85716
|
+
const key4 = `${getTypeId(containingType)}|${isUncheckedJS}`;
|
|
85717
|
+
if (cache.has(key4)) {
|
|
85718
85718
|
return;
|
|
85719
85719
|
}
|
|
85720
|
-
cache.add(
|
|
85720
|
+
cache.add(key4);
|
|
85721
85721
|
let errorInfo;
|
|
85722
85722
|
let relatedInfo;
|
|
85723
85723
|
if (!isPrivateIdentifier(propNode) && containingType.flags & 134217728 && !(containingType.flags & 12713980)) {
|
|
@@ -89067,8 +89067,8 @@ ${lanes.join("\n")}
|
|
|
89067
89067
|
), [thisType, valueType]);
|
|
89068
89068
|
}
|
|
89069
89069
|
function getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2) {
|
|
89070
|
-
const
|
|
89071
|
-
let overrideType = decoratorContextOverrideTypeCache.get(
|
|
89070
|
+
const key4 = `${isPrivate ? "p" : "P"}${isStatic2 ? "s" : "S"}${nameType.id}`;
|
|
89071
|
+
let overrideType = decoratorContextOverrideTypeCache.get(key4);
|
|
89072
89072
|
if (!overrideType) {
|
|
89073
89073
|
const members = createSymbolTable();
|
|
89074
89074
|
members.set("name", createProperty("name", nameType));
|
|
@@ -89082,7 +89082,7 @@ ${lanes.join("\n")}
|
|
|
89082
89082
|
emptyArray,
|
|
89083
89083
|
emptyArray
|
|
89084
89084
|
);
|
|
89085
|
-
decoratorContextOverrideTypeCache.set(
|
|
89085
|
+
decoratorContextOverrideTypeCache.set(key4, overrideType);
|
|
89086
89086
|
}
|
|
89087
89087
|
return overrideType;
|
|
89088
89088
|
}
|
|
@@ -94126,13 +94126,13 @@ ${lanes.join("\n")}
|
|
|
94126
94126
|
function isTypeParameterUnused(typeParameter) {
|
|
94127
94127
|
return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144) && !isIdentifierThatStartsWithUnderscore(typeParameter.name);
|
|
94128
94128
|
}
|
|
94129
|
-
function addToGroup(map22,
|
|
94130
|
-
const keyString = String(getKey(
|
|
94129
|
+
function addToGroup(map22, key4, value, getKey) {
|
|
94130
|
+
const keyString = String(getKey(key4));
|
|
94131
94131
|
const group2 = map22.get(keyString);
|
|
94132
94132
|
if (group2) {
|
|
94133
94133
|
group2[1].push(value);
|
|
94134
94134
|
} else {
|
|
94135
|
-
map22.set(keyString, [
|
|
94135
|
+
map22.set(keyString, [key4, [value]]);
|
|
94136
94136
|
}
|
|
94137
94137
|
}
|
|
94138
94138
|
function tryGetRootParameterDeclaration(node) {
|
|
@@ -101695,10 +101695,10 @@ ${lanes.join("\n")}
|
|
|
101695
101695
|
}
|
|
101696
101696
|
return false;
|
|
101697
101697
|
}
|
|
101698
|
-
function grammarErrorOnNodeSkippedOn(
|
|
101698
|
+
function grammarErrorOnNodeSkippedOn(key4, node, message, ...args) {
|
|
101699
101699
|
const sourceFile = getSourceFileOfNode(node);
|
|
101700
101700
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
101701
|
-
errorSkippedOn(
|
|
101701
|
+
errorSkippedOn(key4, node, message, ...args);
|
|
101702
101702
|
return true;
|
|
101703
101703
|
}
|
|
101704
101704
|
return false;
|
|
@@ -105017,12 +105017,12 @@ ${lanes.join("\n")}
|
|
|
105017
105017
|
}
|
|
105018
105018
|
return exportedNames;
|
|
105019
105019
|
}
|
|
105020
|
-
function multiMapSparseArrayAdd(map22,
|
|
105021
|
-
let values = map22[
|
|
105020
|
+
function multiMapSparseArrayAdd(map22, key4, value) {
|
|
105021
|
+
let values = map22[key4];
|
|
105022
105022
|
if (values) {
|
|
105023
105023
|
values.push(value);
|
|
105024
105024
|
} else {
|
|
105025
|
-
map22[
|
|
105025
|
+
map22[key4] = values = [value];
|
|
105026
105026
|
}
|
|
105027
105027
|
return values;
|
|
105028
105028
|
}
|
|
@@ -105033,19 +105033,19 @@ ${lanes.join("\n")}
|
|
|
105033
105033
|
get size() {
|
|
105034
105034
|
return this._map.size;
|
|
105035
105035
|
}
|
|
105036
|
-
has(
|
|
105037
|
-
return this._map.has(_IdentifierNameMap.toKey(
|
|
105036
|
+
has(key4) {
|
|
105037
|
+
return this._map.has(_IdentifierNameMap.toKey(key4));
|
|
105038
105038
|
}
|
|
105039
|
-
get(
|
|
105040
|
-
return this._map.get(_IdentifierNameMap.toKey(
|
|
105039
|
+
get(key4) {
|
|
105040
|
+
return this._map.get(_IdentifierNameMap.toKey(key4));
|
|
105041
105041
|
}
|
|
105042
|
-
set(
|
|
105043
|
-
this._map.set(_IdentifierNameMap.toKey(
|
|
105042
|
+
set(key4, value) {
|
|
105043
|
+
this._map.set(_IdentifierNameMap.toKey(key4), value);
|
|
105044
105044
|
return this;
|
|
105045
105045
|
}
|
|
105046
|
-
delete(
|
|
105046
|
+
delete(key4) {
|
|
105047
105047
|
var _a3;
|
|
105048
|
-
return ((_a3 = this._map) == null ? void 0 : _a3.delete(_IdentifierNameMap.toKey(
|
|
105048
|
+
return ((_a3 = this._map) == null ? void 0 : _a3.delete(_IdentifierNameMap.toKey(key4))) ?? false;
|
|
105049
105049
|
}
|
|
105050
105050
|
clear() {
|
|
105051
105051
|
this._map.clear();
|
|
@@ -105086,21 +105086,21 @@ ${lanes.join("\n")}
|
|
|
105086
105086
|
}
|
|
105087
105087
|
};
|
|
105088
105088
|
var IdentifierNameMultiMap = class extends IdentifierNameMap {
|
|
105089
|
-
add(
|
|
105090
|
-
let values = this.get(
|
|
105089
|
+
add(key4, value) {
|
|
105090
|
+
let values = this.get(key4);
|
|
105091
105091
|
if (values) {
|
|
105092
105092
|
values.push(value);
|
|
105093
105093
|
} else {
|
|
105094
|
-
this.set(
|
|
105094
|
+
this.set(key4, values = [value]);
|
|
105095
105095
|
}
|
|
105096
105096
|
return values;
|
|
105097
105097
|
}
|
|
105098
|
-
remove(
|
|
105099
|
-
const values = this.get(
|
|
105098
|
+
remove(key4, value) {
|
|
105099
|
+
const values = this.get(key4);
|
|
105100
105100
|
if (values) {
|
|
105101
105101
|
unorderedRemoveItem(values, value);
|
|
105102
105102
|
if (!values.length) {
|
|
105103
|
-
this.delete(
|
|
105103
|
+
this.delete(key4);
|
|
105104
105104
|
}
|
|
105105
105105
|
}
|
|
105106
105106
|
}
|
|
@@ -105865,8 +105865,8 @@ ${lanes.join("\n")}
|
|
|
105865
105865
|
}
|
|
105866
105866
|
const assignedName = factory2.getGeneratedNameForNode(name);
|
|
105867
105867
|
context.hoistVariableDeclaration(assignedName);
|
|
105868
|
-
const
|
|
105869
|
-
const assignment = factory2.createAssignment(assignedName,
|
|
105868
|
+
const key4 = context.getEmitHelperFactory().createPropKeyHelper(name.expression);
|
|
105869
|
+
const assignment = factory2.createAssignment(assignedName, key4);
|
|
105870
105870
|
const updatedName = factory2.updateComputedPropertyName(name, assignment);
|
|
105871
105871
|
return { assignedName, name: updatedName };
|
|
105872
105872
|
}
|
|
@@ -112841,8 +112841,8 @@ ${lanes.join("\n")}
|
|
|
112841
112841
|
}
|
|
112842
112842
|
const referencedName = factory2.getGeneratedNameForNode(node);
|
|
112843
112843
|
hoistVariableDeclaration(referencedName);
|
|
112844
|
-
const
|
|
112845
|
-
const assignment = factory2.createAssignment(referencedName,
|
|
112844
|
+
const key4 = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression));
|
|
112845
|
+
const assignment = factory2.createAssignment(referencedName, key4);
|
|
112846
112846
|
const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment));
|
|
112847
112847
|
return { referencedName, name };
|
|
112848
112848
|
}
|
|
@@ -114176,8 +114176,8 @@ ${lanes.join("\n")}
|
|
|
114176
114176
|
/* MethodWithSuperPropertyAssignmentInAsync */
|
|
114177
114177
|
);
|
|
114178
114178
|
const accessors = [];
|
|
114179
|
-
names.forEach((_,
|
|
114180
|
-
const name = unescapeLeadingUnderscores(
|
|
114179
|
+
names.forEach((_, key4) => {
|
|
114180
|
+
const name = unescapeLeadingUnderscores(key4);
|
|
114181
114181
|
const getterAndSetter = [];
|
|
114182
114182
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
114183
114183
|
"get",
|
|
@@ -122199,7 +122199,7 @@ ${lanes.join("\n")}
|
|
|
122199
122199
|
if (containsYield(node)) {
|
|
122200
122200
|
const obj = declareLocal();
|
|
122201
122201
|
const keysArray = declareLocal();
|
|
122202
|
-
const
|
|
122202
|
+
const key4 = declareLocal();
|
|
122203
122203
|
const keysIndex = factory2.createLoopVariable();
|
|
122204
122204
|
const initializer3 = node.initializer;
|
|
122205
122205
|
hoistVariableDeclaration(keysIndex);
|
|
@@ -122207,14 +122207,14 @@ ${lanes.join("\n")}
|
|
|
122207
122207
|
emitAssignment(keysArray, factory2.createArrayLiteralExpression());
|
|
122208
122208
|
emitStatement(
|
|
122209
122209
|
factory2.createForInStatement(
|
|
122210
|
-
|
|
122210
|
+
key4,
|
|
122211
122211
|
obj,
|
|
122212
122212
|
factory2.createExpressionStatement(
|
|
122213
122213
|
factory2.createCallExpression(
|
|
122214
122214
|
factory2.createPropertyAccessExpression(keysArray, "push"),
|
|
122215
122215
|
/*typeArguments*/
|
|
122216
122216
|
void 0,
|
|
122217
|
-
[
|
|
122217
|
+
[key4]
|
|
122218
122218
|
)
|
|
122219
122219
|
)
|
|
122220
122220
|
)
|
|
@@ -122225,8 +122225,8 @@ ${lanes.join("\n")}
|
|
|
122225
122225
|
const endLoopLabel = beginLoopBlock(incrementLabel);
|
|
122226
122226
|
markLabel(conditionLabel);
|
|
122227
122227
|
emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length")));
|
|
122228
|
-
emitAssignment(
|
|
122229
|
-
emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(
|
|
122228
|
+
emitAssignment(key4, factory2.createElementAccessExpression(keysArray, keysIndex));
|
|
122229
|
+
emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key4, 103, obj));
|
|
122230
122230
|
let variable;
|
|
122231
122231
|
if (isVariableDeclarationList(initializer3)) {
|
|
122232
122232
|
for (const variable2 of initializer3.declarations) {
|
|
@@ -122237,7 +122237,7 @@ ${lanes.join("\n")}
|
|
|
122237
122237
|
variable = Debug.checkDefined(visitNode(initializer3, visitor, isExpression));
|
|
122238
122238
|
Debug.assert(isLeftHandSideExpression(variable));
|
|
122239
122239
|
}
|
|
122240
|
-
emitAssignment(variable,
|
|
122240
|
+
emitAssignment(variable, key4);
|
|
122241
122241
|
transformAndEmitEmbeddedStatement(node.statement);
|
|
122242
122242
|
markLabel(incrementLabel);
|
|
122243
122243
|
emitStatement(factory2.createExpressionStatement(factory2.createPostfixIncrement(keysIndex)));
|
|
@@ -128493,10 +128493,10 @@ ${lanes.join("\n")}
|
|
|
128493
128493
|
return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement);
|
|
128494
128494
|
function visitLateVisibilityMarkedStatements(statement) {
|
|
128495
128495
|
if (isLateVisibilityPaintedStatement(statement)) {
|
|
128496
|
-
const
|
|
128497
|
-
if (lateStatementReplacementMap.has(
|
|
128498
|
-
const result3 = lateStatementReplacementMap.get(
|
|
128499
|
-
lateStatementReplacementMap.delete(
|
|
128496
|
+
const key4 = getOriginalNodeId(statement);
|
|
128497
|
+
if (lateStatementReplacementMap.has(key4)) {
|
|
128498
|
+
const result3 = lateStatementReplacementMap.get(key4);
|
|
128499
|
+
lateStatementReplacementMap.delete(key4);
|
|
128500
128500
|
if (result3) {
|
|
128501
128501
|
if (isArray(result3) ? some(result3, needsScopeMarker) : needsScopeMarker(result3)) {
|
|
128502
128502
|
needsScopeFixMarker = true;
|
|
@@ -134620,8 +134620,8 @@ ${lanes.join("\n")}
|
|
|
134620
134620
|
if (prefix.length > 0 && prefix.charCodeAt(0) === 35) {
|
|
134621
134621
|
prefix = prefix.slice(1);
|
|
134622
134622
|
}
|
|
134623
|
-
const
|
|
134624
|
-
let tempFlags2 = getTempFlags(
|
|
134623
|
+
const key4 = formatGeneratedName(privateName, prefix, "", suffix);
|
|
134624
|
+
let tempFlags2 = getTempFlags(key4);
|
|
134625
134625
|
if (flags && !(tempFlags2 & flags)) {
|
|
134626
134626
|
const name = flags === 268435456 ? "_i" : "_n";
|
|
134627
134627
|
const fullName = formatGeneratedName(privateName, prefix, name, suffix);
|
|
@@ -134632,7 +134632,7 @@ ${lanes.join("\n")}
|
|
|
134632
134632
|
} else if (reservedInNestedScopes) {
|
|
134633
134633
|
reserveNameInNestedScopes(fullName);
|
|
134634
134634
|
}
|
|
134635
|
-
setTempFlags(
|
|
134635
|
+
setTempFlags(key4, tempFlags2);
|
|
134636
134636
|
return fullName;
|
|
134637
134637
|
}
|
|
134638
134638
|
}
|
|
@@ -134648,7 +134648,7 @@ ${lanes.join("\n")}
|
|
|
134648
134648
|
} else if (reservedInNestedScopes) {
|
|
134649
134649
|
reserveNameInNestedScopes(fullName);
|
|
134650
134650
|
}
|
|
134651
|
-
setTempFlags(
|
|
134651
|
+
setTempFlags(key4, tempFlags2);
|
|
134652
134652
|
return fullName;
|
|
134653
134653
|
}
|
|
134654
134654
|
}
|
|
@@ -135611,10 +135611,10 @@ ${lanes.join("\n")}
|
|
|
135611
135611
|
}
|
|
135612
135612
|
function cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3) {
|
|
135613
135613
|
if (!extendedConfigCache.delete(extendedConfigFilePath)) return;
|
|
135614
|
-
extendedConfigCache.forEach(({ extendedResult },
|
|
135614
|
+
extendedConfigCache.forEach(({ extendedResult }, key4) => {
|
|
135615
135615
|
var _a3;
|
|
135616
135616
|
if ((_a3 = extendedResult.extendedSourceFiles) == null ? void 0 : _a3.some((extendedFile) => toPath3(extendedFile) === extendedConfigFilePath)) {
|
|
135617
|
-
cleanExtendedConfigCache(extendedConfigCache,
|
|
135617
|
+
cleanExtendedConfigCache(extendedConfigCache, key4, toPath3);
|
|
135618
135618
|
}
|
|
135619
135619
|
});
|
|
135620
135620
|
}
|
|
@@ -135765,10 +135765,10 @@ ${lanes.join("\n")}
|
|
|
135765
135765
|
watchFile: createExcludeHandlingAddWatch("watchFile"),
|
|
135766
135766
|
watchDirectory: createExcludeHandlingAddWatch("watchDirectory")
|
|
135767
135767
|
};
|
|
135768
|
-
function createExcludeHandlingAddWatch(
|
|
135768
|
+
function createExcludeHandlingAddWatch(key4) {
|
|
135769
135769
|
return (file2, cb, flags, options, detailInfo1, detailInfo2) => {
|
|
135770
135770
|
var _a3;
|
|
135771
|
-
return !matchesExclude(file2,
|
|
135771
|
+
return !matchesExclude(file2, key4 === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a3 = host.getCurrentDirectory) == null ? void 0 : _a3.call(host)) || "") ? factory2[key4].call(
|
|
135772
135772
|
/*thisArgs*/
|
|
135773
135773
|
void 0,
|
|
135774
135774
|
file2,
|
|
@@ -135817,13 +135817,13 @@ ${lanes.join("\n")}
|
|
|
135817
135817
|
}
|
|
135818
135818
|
};
|
|
135819
135819
|
}
|
|
135820
|
-
function createTriggerLoggingAddWatch(
|
|
135821
|
-
return (file2, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[
|
|
135820
|
+
function createTriggerLoggingAddWatch(key4) {
|
|
135821
|
+
return (file2, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[key4].call(
|
|
135822
135822
|
/*thisArgs*/
|
|
135823
135823
|
void 0,
|
|
135824
135824
|
file2,
|
|
135825
135825
|
(...args) => {
|
|
135826
|
-
const triggerredInfo = `${
|
|
135826
|
+
const triggerredInfo = `${key4 === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : ""}:: ${getWatchInfo(file2, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`;
|
|
135827
135827
|
log(triggerredInfo);
|
|
135828
135828
|
const start = timestamp3();
|
|
135829
135829
|
cb.call(
|
|
@@ -135992,19 +135992,19 @@ ${lanes.join("\n")}
|
|
|
135992
135992
|
const directoryExistsCache = /* @__PURE__ */ new Map();
|
|
135993
135993
|
const sourceFileCache = /* @__PURE__ */ new Map();
|
|
135994
135994
|
const readFileWithCache = (fileName) => {
|
|
135995
|
-
const
|
|
135996
|
-
const value = readFileCache.get(
|
|
135995
|
+
const key4 = toPath3(fileName);
|
|
135996
|
+
const value = readFileCache.get(key4);
|
|
135997
135997
|
if (value !== void 0) return value !== false ? value : void 0;
|
|
135998
|
-
return setReadFileCache(
|
|
135998
|
+
return setReadFileCache(key4, fileName);
|
|
135999
135999
|
};
|
|
136000
|
-
const setReadFileCache = (
|
|
136000
|
+
const setReadFileCache = (key4, fileName) => {
|
|
136001
136001
|
const newValue = originalReadFile.call(host, fileName);
|
|
136002
|
-
readFileCache.set(
|
|
136002
|
+
readFileCache.set(key4, newValue !== void 0 ? newValue : false);
|
|
136003
136003
|
return newValue;
|
|
136004
136004
|
};
|
|
136005
136005
|
host.readFile = (fileName) => {
|
|
136006
|
-
const
|
|
136007
|
-
const value = readFileCache.get(
|
|
136006
|
+
const key4 = toPath3(fileName);
|
|
136007
|
+
const value = readFileCache.get(key4);
|
|
136008
136008
|
if (value !== void 0) return value !== false ? value : void 0;
|
|
136009
136009
|
if (!fileExtensionIs(
|
|
136010
136010
|
fileName,
|
|
@@ -136013,13 +136013,13 @@ ${lanes.join("\n")}
|
|
|
136013
136013
|
) && !isBuildInfoFile(fileName)) {
|
|
136014
136014
|
return originalReadFile.call(host, fileName);
|
|
136015
136015
|
}
|
|
136016
|
-
return setReadFileCache(
|
|
136016
|
+
return setReadFileCache(key4, fileName);
|
|
136017
136017
|
};
|
|
136018
136018
|
const getSourceFileWithCache = getSourceFile ? (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) => {
|
|
136019
|
-
const
|
|
136019
|
+
const key4 = toPath3(fileName);
|
|
136020
136020
|
const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0;
|
|
136021
136021
|
const forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat);
|
|
136022
|
-
const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(
|
|
136022
|
+
const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(key4);
|
|
136023
136023
|
if (value) return value;
|
|
136024
136024
|
const sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
|
|
136025
136025
|
if (sourceFile && (isDeclarationFileName(fileName) || fileExtensionIs(
|
|
@@ -136027,31 +136027,31 @@ ${lanes.join("\n")}
|
|
|
136027
136027
|
".json"
|
|
136028
136028
|
/* Json */
|
|
136029
136029
|
))) {
|
|
136030
|
-
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(
|
|
136030
|
+
sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(key4, sourceFile));
|
|
136031
136031
|
}
|
|
136032
136032
|
return sourceFile;
|
|
136033
136033
|
} : void 0;
|
|
136034
136034
|
host.fileExists = (fileName) => {
|
|
136035
|
-
const
|
|
136036
|
-
const value = fileExistsCache.get(
|
|
136035
|
+
const key4 = toPath3(fileName);
|
|
136036
|
+
const value = fileExistsCache.get(key4);
|
|
136037
136037
|
if (value !== void 0) return value;
|
|
136038
136038
|
const newValue = originalFileExists.call(host, fileName);
|
|
136039
|
-
fileExistsCache.set(
|
|
136039
|
+
fileExistsCache.set(key4, !!newValue);
|
|
136040
136040
|
return newValue;
|
|
136041
136041
|
};
|
|
136042
136042
|
if (originalWriteFile) {
|
|
136043
136043
|
host.writeFile = (fileName, data, ...rest) => {
|
|
136044
|
-
const
|
|
136045
|
-
fileExistsCache.delete(
|
|
136046
|
-
const value = readFileCache.get(
|
|
136044
|
+
const key4 = toPath3(fileName);
|
|
136045
|
+
fileExistsCache.delete(key4);
|
|
136046
|
+
const value = readFileCache.get(key4);
|
|
136047
136047
|
if (value !== void 0 && value !== data) {
|
|
136048
|
-
readFileCache.delete(
|
|
136049
|
-
sourceFileCache.forEach((map22) => map22.delete(
|
|
136048
|
+
readFileCache.delete(key4);
|
|
136049
|
+
sourceFileCache.forEach((map22) => map22.delete(key4));
|
|
136050
136050
|
} else if (getSourceFileWithCache) {
|
|
136051
136051
|
sourceFileCache.forEach((map22) => {
|
|
136052
|
-
const sourceFile = map22.get(
|
|
136052
|
+
const sourceFile = map22.get(key4);
|
|
136053
136053
|
if (sourceFile && sourceFile.text !== data) {
|
|
136054
|
-
map22.delete(
|
|
136054
|
+
map22.delete(key4);
|
|
136055
136055
|
}
|
|
136056
136056
|
});
|
|
136057
136057
|
}
|
|
@@ -136060,17 +136060,17 @@ ${lanes.join("\n")}
|
|
|
136060
136060
|
}
|
|
136061
136061
|
if (originalDirectoryExists) {
|
|
136062
136062
|
host.directoryExists = (directory) => {
|
|
136063
|
-
const
|
|
136064
|
-
const value = directoryExistsCache.get(
|
|
136063
|
+
const key4 = toPath3(directory);
|
|
136064
|
+
const value = directoryExistsCache.get(key4);
|
|
136065
136065
|
if (value !== void 0) return value;
|
|
136066
136066
|
const newValue = originalDirectoryExists.call(host, directory);
|
|
136067
|
-
directoryExistsCache.set(
|
|
136067
|
+
directoryExistsCache.set(key4, !!newValue);
|
|
136068
136068
|
return newValue;
|
|
136069
136069
|
};
|
|
136070
136070
|
if (originalCreateDirectory) {
|
|
136071
136071
|
host.createDirectory = (directory) => {
|
|
136072
|
-
const
|
|
136073
|
-
directoryExistsCache.delete(
|
|
136072
|
+
const key4 = toPath3(directory);
|
|
136073
|
+
directoryExistsCache.delete(key4);
|
|
136074
136074
|
originalCreateDirectory.call(host, directory);
|
|
136075
136075
|
};
|
|
136076
136076
|
}
|
|
@@ -136398,10 +136398,10 @@ ${lanes.join("\n")}
|
|
|
136398
136398
|
for (const entry of entries) {
|
|
136399
136399
|
const name = loader.nameAndMode.getName(entry);
|
|
136400
136400
|
const mode = loader.nameAndMode.getMode(entry, containingSourceFile, (redirectedReference == null ? void 0 : redirectedReference.commandLine.options) || options);
|
|
136401
|
-
const
|
|
136402
|
-
let result3 = cache.get(
|
|
136401
|
+
const key4 = createModeAwareCacheKey(name, mode);
|
|
136402
|
+
let result3 = cache.get(key4);
|
|
136403
136403
|
if (!result3) {
|
|
136404
|
-
cache.set(
|
|
136404
|
+
cache.set(key4, result3 = loader.resolve(name, mode));
|
|
136405
136405
|
}
|
|
136406
136406
|
resolutions.push(result3);
|
|
136407
136407
|
}
|
|
@@ -138880,51 +138880,51 @@ ${lanes.join("\n")}
|
|
|
138880
138880
|
}
|
|
138881
138881
|
}
|
|
138882
138882
|
if (options.paths) {
|
|
138883
|
-
for (const
|
|
138884
|
-
if (!hasProperty(options.paths,
|
|
138883
|
+
for (const key4 in options.paths) {
|
|
138884
|
+
if (!hasProperty(options.paths, key4)) {
|
|
138885
138885
|
continue;
|
|
138886
138886
|
}
|
|
138887
|
-
if (!hasZeroOrOneAsteriskCharacter(
|
|
138887
|
+
if (!hasZeroOrOneAsteriskCharacter(key4)) {
|
|
138888
138888
|
createDiagnosticForOptionPaths(
|
|
138889
138889
|
/*onKey*/
|
|
138890
138890
|
true,
|
|
138891
|
-
|
|
138891
|
+
key4,
|
|
138892
138892
|
Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character,
|
|
138893
|
-
|
|
138893
|
+
key4
|
|
138894
138894
|
);
|
|
138895
138895
|
}
|
|
138896
|
-
if (isArray(options.paths[
|
|
138897
|
-
const len = options.paths[
|
|
138896
|
+
if (isArray(options.paths[key4])) {
|
|
138897
|
+
const len = options.paths[key4].length;
|
|
138898
138898
|
if (len === 0) {
|
|
138899
138899
|
createDiagnosticForOptionPaths(
|
|
138900
138900
|
/*onKey*/
|
|
138901
138901
|
false,
|
|
138902
|
-
|
|
138902
|
+
key4,
|
|
138903
138903
|
Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array,
|
|
138904
|
-
|
|
138904
|
+
key4
|
|
138905
138905
|
);
|
|
138906
138906
|
}
|
|
138907
138907
|
for (let i = 0; i < len; i++) {
|
|
138908
|
-
const subst = options.paths[
|
|
138908
|
+
const subst = options.paths[key4][i];
|
|
138909
138909
|
const typeOfSubst = typeof subst;
|
|
138910
138910
|
if (typeOfSubst === "string") {
|
|
138911
138911
|
if (!hasZeroOrOneAsteriskCharacter(subst)) {
|
|
138912
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138912
|
+
createDiagnosticForOptionPathKeyValue(key4, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key4);
|
|
138913
138913
|
}
|
|
138914
138914
|
if (!options.baseUrl && !pathIsRelative(subst) && !pathIsAbsolute(subst)) {
|
|
138915
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138915
|
+
createDiagnosticForOptionPathKeyValue(key4, i, Diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash);
|
|
138916
138916
|
}
|
|
138917
138917
|
} else {
|
|
138918
|
-
createDiagnosticForOptionPathKeyValue(
|
|
138918
|
+
createDiagnosticForOptionPathKeyValue(key4, i, Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key4, typeOfSubst);
|
|
138919
138919
|
}
|
|
138920
138920
|
}
|
|
138921
138921
|
} else {
|
|
138922
138922
|
createDiagnosticForOptionPaths(
|
|
138923
138923
|
/*onKey*/
|
|
138924
138924
|
false,
|
|
138925
|
-
|
|
138925
|
+
key4,
|
|
138926
138926
|
Diagnostics.Substitutions_for_pattern_0_should_be_an_array,
|
|
138927
|
-
|
|
138927
|
+
key4
|
|
138928
138928
|
);
|
|
138929
138929
|
}
|
|
138930
138930
|
}
|
|
@@ -139372,11 +139372,11 @@ ${lanes.join("\n")}
|
|
|
139372
139372
|
}
|
|
139373
139373
|
);
|
|
139374
139374
|
}
|
|
139375
|
-
function createDiagnosticForOptionPathKeyValue(
|
|
139375
|
+
function createDiagnosticForOptionPathKeyValue(key4, valueIndex, message, ...args) {
|
|
139376
139376
|
let needCompilerDiagnostic = true;
|
|
139377
139377
|
forEachOptionPathsSyntax((pathProp) => {
|
|
139378
139378
|
if (isObjectLiteralExpression(pathProp.initializer)) {
|
|
139379
|
-
forEachPropertyAssignment(pathProp.initializer,
|
|
139379
|
+
forEachPropertyAssignment(pathProp.initializer, key4, (keyProps) => {
|
|
139380
139380
|
const initializer3 = keyProps.initializer;
|
|
139381
139381
|
if (isArrayLiteralExpression(initializer3) && initializer3.elements.length > valueIndex) {
|
|
139382
139382
|
programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer3.elements[valueIndex], message, ...args));
|
|
@@ -139389,13 +139389,13 @@ ${lanes.join("\n")}
|
|
|
139389
139389
|
createCompilerOptionsDiagnostic(message, ...args);
|
|
139390
139390
|
}
|
|
139391
139391
|
}
|
|
139392
|
-
function createDiagnosticForOptionPaths(onKey,
|
|
139392
|
+
function createDiagnosticForOptionPaths(onKey, key4, message, ...args) {
|
|
139393
139393
|
let needCompilerDiagnostic = true;
|
|
139394
139394
|
forEachOptionPathsSyntax((pathProp) => {
|
|
139395
139395
|
if (isObjectLiteralExpression(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax(
|
|
139396
139396
|
pathProp.initializer,
|
|
139397
139397
|
onKey,
|
|
139398
|
-
|
|
139398
|
+
key4,
|
|
139399
139399
|
/*key2*/
|
|
139400
139400
|
void 0,
|
|
139401
139401
|
message,
|
|
@@ -140409,8 +140409,8 @@ ${lanes.join("\n")}
|
|
|
140409
140409
|
seenMap.add(path2);
|
|
140410
140410
|
const references = state.referencedMap.getValues(path2);
|
|
140411
140411
|
if (references) {
|
|
140412
|
-
for (const
|
|
140413
|
-
queue.push(
|
|
140412
|
+
for (const key4 of references.keys()) {
|
|
140413
|
+
queue.push(key4);
|
|
140414
140414
|
}
|
|
140415
140415
|
}
|
|
140416
140416
|
}
|
|
@@ -140542,7 +140542,7 @@ ${lanes.join("\n")}
|
|
|
140542
140542
|
return result3;
|
|
140543
140543
|
}
|
|
140544
140544
|
function hasSameKeys(map1, map22) {
|
|
140545
|
-
return map1 === map22 || map1 !== void 0 && map22 !== void 0 && map1.size === map22.size && !forEachKey(map1, (
|
|
140545
|
+
return map1 === map22 || map1 !== void 0 && map22 !== void 0 && map1.size === map22.size && !forEachKey(map1, (key4) => !map22.has(key4));
|
|
140546
140546
|
}
|
|
140547
140547
|
function createBuilderProgramState(newProgram, oldState) {
|
|
140548
140548
|
var _a3, _b;
|
|
@@ -141100,9 +141100,9 @@ ${lanes.join("\n")}
|
|
|
141100
141100
|
}
|
|
141101
141101
|
const root = [];
|
|
141102
141102
|
if (state.compilerOptions.outFile) {
|
|
141103
|
-
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([
|
|
141104
|
-
const fileId = toFileId(
|
|
141105
|
-
tryAddRoot(
|
|
141103
|
+
const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key4, value]) => {
|
|
141104
|
+
const fileId = toFileId(key4);
|
|
141105
|
+
tryAddRoot(key4, fileId);
|
|
141106
141106
|
return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version;
|
|
141107
141107
|
});
|
|
141108
141108
|
const buildInfo2 = {
|
|
@@ -141133,17 +141133,17 @@ ${lanes.join("\n")}
|
|
|
141133
141133
|
let fileIdsList;
|
|
141134
141134
|
let fileNamesToFileIdListId;
|
|
141135
141135
|
let emitSignatures;
|
|
141136
|
-
const fileInfos = arrayFrom(state.fileInfos.entries(), ([
|
|
141136
|
+
const fileInfos = arrayFrom(state.fileInfos.entries(), ([key4, value]) => {
|
|
141137
141137
|
var _a22, _b2;
|
|
141138
|
-
const fileId = toFileId(
|
|
141139
|
-
tryAddRoot(
|
|
141140
|
-
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(
|
|
141141
|
-
const oldSignature = (_a22 = state.oldSignatures) == null ? void 0 : _a22.get(
|
|
141138
|
+
const fileId = toFileId(key4);
|
|
141139
|
+
tryAddRoot(key4, fileId);
|
|
141140
|
+
Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key4));
|
|
141141
|
+
const oldSignature = (_a22 = state.oldSignatures) == null ? void 0 : _a22.get(key4);
|
|
141142
141142
|
const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature;
|
|
141143
141143
|
if (state.compilerOptions.composite) {
|
|
141144
|
-
const file2 = state.program.getSourceFileByPath(
|
|
141144
|
+
const file2 = state.program.getSourceFileByPath(key4);
|
|
141145
141145
|
if (!isJsonSourceFile(file2) && sourceFileMayBeEmitted(file2, state.program)) {
|
|
141146
|
-
const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(
|
|
141146
|
+
const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key4);
|
|
141147
141147
|
if (emitSignature !== actualSignature) {
|
|
141148
141148
|
emitSignatures = append(
|
|
141149
141149
|
emitSignatures,
|
|
@@ -141178,9 +141178,9 @@ ${lanes.join("\n")}
|
|
|
141178
141178
|
});
|
|
141179
141179
|
let referencedMap;
|
|
141180
141180
|
if ((_a3 = state.referencedMap) == null ? void 0 : _a3.size()) {
|
|
141181
|
-
referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((
|
|
141182
|
-
toFileId(
|
|
141183
|
-
toFileIdListId(state.referencedMap.getValues(
|
|
141181
|
+
referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((key4) => [
|
|
141182
|
+
toFileId(key4),
|
|
141183
|
+
toFileIdListId(state.referencedMap.getValues(key4))
|
|
141184
141184
|
]);
|
|
141185
141185
|
}
|
|
141186
141186
|
const semanticDiagnosticsPerFile = toIncrementalBuildInfoDiagnostics();
|
|
@@ -141242,11 +141242,11 @@ ${lanes.join("\n")}
|
|
|
141242
141242
|
}
|
|
141243
141243
|
function toFileIdListId(set2) {
|
|
141244
141244
|
const fileIds = arrayFrom(set2.keys(), toFileId).sort(compareValues);
|
|
141245
|
-
const
|
|
141246
|
-
let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(
|
|
141245
|
+
const key4 = fileIds.join();
|
|
141246
|
+
let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(key4);
|
|
141247
141247
|
if (fileIdListId === void 0) {
|
|
141248
141248
|
fileIdsList = append(fileIdsList, fileIds);
|
|
141249
|
-
(fileNamesToFileIdListId ?? (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(
|
|
141249
|
+
(fileNamesToFileIdListId ?? (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(key4, fileIdListId = fileIdsList.length);
|
|
141250
141250
|
}
|
|
141251
141251
|
return fileIdListId;
|
|
141252
141252
|
}
|
|
@@ -141306,14 +141306,14 @@ ${lanes.join("\n")}
|
|
|
141306
141306
|
}
|
|
141307
141307
|
function toIncrementalBuildInfoDiagnostics() {
|
|
141308
141308
|
let result3;
|
|
141309
|
-
state.fileInfos.forEach((_value,
|
|
141310
|
-
const value = state.semanticDiagnosticsPerFile.get(
|
|
141309
|
+
state.fileInfos.forEach((_value, key4) => {
|
|
141310
|
+
const value = state.semanticDiagnosticsPerFile.get(key4);
|
|
141311
141311
|
if (!value) {
|
|
141312
|
-
if (!state.changedFilesSet.has(
|
|
141312
|
+
if (!state.changedFilesSet.has(key4)) result3 = append(result3, toFileId(key4));
|
|
141313
141313
|
} else if (value.length) {
|
|
141314
141314
|
result3 = append(result3, [
|
|
141315
|
-
toFileId(
|
|
141316
|
-
toReusableDiagnostic(value,
|
|
141315
|
+
toFileId(key4),
|
|
141316
|
+
toReusableDiagnostic(value, key4)
|
|
141317
141317
|
]);
|
|
141318
141318
|
}
|
|
141319
141319
|
});
|
|
@@ -141323,11 +141323,11 @@ ${lanes.join("\n")}
|
|
|
141323
141323
|
var _a22;
|
|
141324
141324
|
let result3;
|
|
141325
141325
|
if (!((_a22 = state.emitDiagnosticsPerFile) == null ? void 0 : _a22.size)) return result3;
|
|
141326
|
-
for (const
|
|
141327
|
-
const value = state.emitDiagnosticsPerFile.get(
|
|
141326
|
+
for (const key4 of arrayFrom(state.emitDiagnosticsPerFile.keys()).sort(compareStringsCaseSensitive)) {
|
|
141327
|
+
const value = state.emitDiagnosticsPerFile.get(key4);
|
|
141328
141328
|
result3 = append(result3, [
|
|
141329
|
-
toFileId(
|
|
141330
|
-
toReusableDiagnostic(value,
|
|
141329
|
+
toFileId(key4),
|
|
141330
|
+
toReusableDiagnostic(value, key4)
|
|
141331
141331
|
]);
|
|
141332
141332
|
}
|
|
141333
141333
|
return result3;
|
|
@@ -141907,12 +141907,12 @@ ${lanes.join("\n")}
|
|
|
141907
141907
|
(_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
|
|
141908
141908
|
if (isNumber(value)) emitSignatures.delete(toFilePath(value));
|
|
141909
141909
|
else {
|
|
141910
|
-
const
|
|
141910
|
+
const key4 = toFilePath(value[0]);
|
|
141911
141911
|
emitSignatures.set(
|
|
141912
|
-
|
|
141912
|
+
key4,
|
|
141913
141913
|
!isString(value[1]) && !value[1].length ? (
|
|
141914
141914
|
// File signature is emit signature but differs in map
|
|
141915
|
-
[emitSignatures.get(
|
|
141915
|
+
[emitSignatures.get(key4)]
|
|
141916
141916
|
) : value[1]
|
|
141917
141917
|
);
|
|
141918
141918
|
}
|
|
@@ -141978,7 +141978,7 @@ ${lanes.join("\n")}
|
|
|
141978
141978
|
const semanticDiagnostics = new Map(
|
|
141979
141979
|
mapDefinedIterator(
|
|
141980
141980
|
fileInfos.keys(),
|
|
141981
|
-
(
|
|
141981
|
+
(key4) => !changedFilesSet.has(key4) ? [key4, emptyArray] : void 0
|
|
141982
141982
|
)
|
|
141983
141983
|
);
|
|
141984
141984
|
diagnostics == null ? void 0 : diagnostics.forEach((value) => {
|
|
@@ -142739,9 +142739,9 @@ ${lanes.join("\n")}
|
|
|
142739
142739
|
}
|
|
142740
142740
|
const resolved = getResolutionWithResolvedFileName(resolution);
|
|
142741
142741
|
if (resolved && resolved.resolvedFileName) {
|
|
142742
|
-
const
|
|
142743
|
-
let resolutions = resolvedFileToResolution.get(
|
|
142744
|
-
if (!resolutions) resolvedFileToResolution.set(
|
|
142742
|
+
const key4 = resolutionHost.toPath(resolved.resolvedFileName);
|
|
142743
|
+
let resolutions = resolvedFileToResolution.get(key4);
|
|
142744
|
+
if (!resolutions) resolvedFileToResolution.set(key4, resolutions = /* @__PURE__ */ new Set());
|
|
142745
142745
|
resolutions.add(resolution);
|
|
142746
142746
|
}
|
|
142747
142747
|
}
|
|
@@ -142978,9 +142978,9 @@ ${lanes.join("\n")}
|
|
|
142978
142978
|
resolution.files = void 0;
|
|
142979
142979
|
const resolved = getResolutionWithResolvedFileName(resolution);
|
|
142980
142980
|
if (resolved && resolved.resolvedFileName) {
|
|
142981
|
-
const
|
|
142982
|
-
const resolutions = resolvedFileToResolution.get(
|
|
142983
|
-
if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) resolvedFileToResolution.delete(
|
|
142981
|
+
const key4 = resolutionHost.toPath(resolved.resolvedFileName);
|
|
142982
|
+
const resolutions = resolvedFileToResolution.get(key4);
|
|
142983
|
+
if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) resolvedFileToResolution.delete(key4);
|
|
142984
142984
|
}
|
|
142985
142985
|
const { failedLookupLocations, affectingLocations, alternateResult } = resolution;
|
|
142986
142986
|
if (resolutionsWithFailedLookups.delete(resolution)) {
|
|
@@ -145843,8 +145843,8 @@ ${lanes.join("\n")}
|
|
|
145843
145843
|
}
|
|
145844
145844
|
}
|
|
145845
145845
|
}
|
|
145846
|
-
outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value,
|
|
145847
|
-
if (!(skipOutputs == null ? void 0 : skipOutputs.has(
|
|
145846
|
+
outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value, key4) => {
|
|
145847
|
+
if (!(skipOutputs == null ? void 0 : skipOutputs.has(key4)) && !modifiedOutputs.has(key4)) outputTimeStampMap.delete(key4);
|
|
145848
145848
|
});
|
|
145849
145849
|
}
|
|
145850
145850
|
function getLatestChangedDtsTime(state, options, resolvedConfigPath) {
|
|
@@ -146465,9 +146465,9 @@ ${lanes.join("\n")}
|
|
|
146465
146465
|
function countLines(program) {
|
|
146466
146466
|
const counts2 = getCountsMap();
|
|
146467
146467
|
forEach(program.getSourceFiles(), (file2) => {
|
|
146468
|
-
const
|
|
146468
|
+
const key4 = getCountKey(program, file2);
|
|
146469
146469
|
const lineCount = getLineStarts(file2).length;
|
|
146470
|
-
counts2.set(
|
|
146470
|
+
counts2.set(key4, counts2.get(key4) + lineCount);
|
|
146471
146471
|
});
|
|
146472
146472
|
return counts2;
|
|
146473
146473
|
}
|
|
@@ -146770,8 +146770,8 @@ ${lanes.join("\n")}
|
|
|
146770
146770
|
optionsOfCurCategory.push(option);
|
|
146771
146771
|
categoryMap.set(curCategory, optionsOfCurCategory);
|
|
146772
146772
|
}
|
|
146773
|
-
categoryMap.forEach((value,
|
|
146774
|
-
res.push(`### ${
|
|
146773
|
+
categoryMap.forEach((value, key4) => {
|
|
146774
|
+
res.push(`### ${key4}${sys2.newLine}${sys2.newLine}`);
|
|
146775
146775
|
res = [...res, ...generateGroupOptionOutput(sys2, value)];
|
|
146776
146776
|
});
|
|
146777
146777
|
if (afterOptionsDescription) {
|
|
@@ -147480,8 +147480,8 @@ ${lanes.join("\n")}
|
|
|
147480
147480
|
reportCountStatistic("Files", program.getSourceFiles().length);
|
|
147481
147481
|
const lineCounts = countLines(program);
|
|
147482
147482
|
if (compilerOptions.extendedDiagnostics) {
|
|
147483
|
-
for (const [
|
|
147484
|
-
reportCountStatistic("Lines of " +
|
|
147483
|
+
for (const [key4, value] of lineCounts.entries()) {
|
|
147484
|
+
reportCountStatistic("Lines of " + key4, value);
|
|
147485
147485
|
}
|
|
147486
147486
|
} else {
|
|
147487
147487
|
reportCountStatistic("Lines", reduceLeftIterator(lineCounts.values(), (sum, count) => sum + count, 0));
|
|
@@ -151972,8 +151972,8 @@ ${lanes.join("\n")}
|
|
|
151972
151972
|
const content = tryParseJson(stringContent);
|
|
151973
151973
|
const info = {};
|
|
151974
151974
|
if (content) {
|
|
151975
|
-
for (const
|
|
151976
|
-
const dependencies = content[
|
|
151975
|
+
for (const key4 of dependencyKeys) {
|
|
151976
|
+
const dependencies = content[key4];
|
|
151977
151977
|
if (!dependencies) {
|
|
151978
151978
|
continue;
|
|
151979
151979
|
}
|
|
@@ -151981,7 +151981,7 @@ ${lanes.join("\n")}
|
|
|
151981
151981
|
for (const packageName in dependencies) {
|
|
151982
151982
|
dependencyMap.set(packageName, dependencies[packageName]);
|
|
151983
151983
|
}
|
|
151984
|
-
info[
|
|
151984
|
+
info[key4] = dependencyMap;
|
|
151985
151985
|
}
|
|
151986
151986
|
}
|
|
151987
151987
|
const dependencyGroups = [
|
|
@@ -152494,7 +152494,7 @@ ${lanes.join("\n")}
|
|
|
152494
152494
|
const storedSymbol = symbol2.flags & 33554432 ? void 0 : symbol2;
|
|
152495
152495
|
const storedModuleSymbol = moduleSymbol.flags & 33554432 ? void 0 : moduleSymbol;
|
|
152496
152496
|
if (!storedSymbol || !storedModuleSymbol) symbols.set(id, [symbol2, moduleSymbol]);
|
|
152497
|
-
exportInfo.add(
|
|
152497
|
+
exportInfo.add(key4(symbolName2, symbol2, isExternalModuleNameRelative(moduleName) ? void 0 : moduleName, checker), {
|
|
152498
152498
|
id,
|
|
152499
152499
|
symbolTableKey,
|
|
152500
152500
|
symbolName: symbolName2,
|
|
@@ -152586,7 +152586,7 @@ ${lanes.join("\n")}
|
|
|
152586
152586
|
isFromPackageJson
|
|
152587
152587
|
};
|
|
152588
152588
|
}
|
|
152589
|
-
function
|
|
152589
|
+
function key4(importedName, symbol2, ambientModuleName, checker) {
|
|
152590
152590
|
const moduleKey = ambientModuleName || "";
|
|
152591
152591
|
return `${importedName.length} ${getSymbolId(skipAlias(symbol2, checker))} ${importedName} ${moduleKey}`;
|
|
152592
152592
|
}
|
|
@@ -152812,12 +152812,12 @@ ${lanes.join("\n")}
|
|
|
152812
152812
|
checker
|
|
152813
152813
|
);
|
|
152814
152814
|
}
|
|
152815
|
-
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported,
|
|
152816
|
-
if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports,
|
|
152815
|
+
checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key4) => {
|
|
152816
|
+
if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports, key4)) {
|
|
152817
152817
|
cache.add(
|
|
152818
152818
|
importingFile.path,
|
|
152819
152819
|
exported,
|
|
152820
|
-
|
|
152820
|
+
key4,
|
|
152821
152821
|
moduleSymbol,
|
|
152822
152822
|
moduleFile,
|
|
152823
152823
|
0,
|
|
@@ -154407,15 +154407,15 @@ ${lanes.join("\n")}
|
|
|
154407
154407
|
}
|
|
154408
154408
|
function acquireDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154409
154409
|
const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154410
|
-
const
|
|
154411
|
-
return acquireDocumentWithKey(fileName, path2, compilationSettings,
|
|
154410
|
+
const key4 = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
154411
|
+
return acquireDocumentWithKey(fileName, path2, compilationSettings, key4, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
154412
154412
|
}
|
|
154413
|
-
function acquireDocumentWithKey(fileName, path2, compilationSettings,
|
|
154413
|
+
function acquireDocumentWithKey(fileName, path2, compilationSettings, key4, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154414
154414
|
return acquireOrUpdateDocument(
|
|
154415
154415
|
fileName,
|
|
154416
154416
|
path2,
|
|
154417
154417
|
compilationSettings,
|
|
154418
|
-
|
|
154418
|
+
key4,
|
|
154419
154419
|
scriptSnapshot,
|
|
154420
154420
|
version22,
|
|
154421
154421
|
/*acquiring*/
|
|
@@ -154426,15 +154426,15 @@ ${lanes.join("\n")}
|
|
|
154426
154426
|
}
|
|
154427
154427
|
function updateDocument(fileName, compilationSettings, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154428
154428
|
const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154429
|
-
const
|
|
154430
|
-
return updateDocumentWithKey(fileName, path2, compilationSettings,
|
|
154429
|
+
const key4 = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
|
|
154430
|
+
return updateDocumentWithKey(fileName, path2, compilationSettings, key4, scriptSnapshot, version22, scriptKind, languageVersionOrOptions);
|
|
154431
154431
|
}
|
|
154432
|
-
function updateDocumentWithKey(fileName, path2, compilationSettings,
|
|
154432
|
+
function updateDocumentWithKey(fileName, path2, compilationSettings, key4, scriptSnapshot, version22, scriptKind, languageVersionOrOptions) {
|
|
154433
154433
|
return acquireOrUpdateDocument(
|
|
154434
154434
|
fileName,
|
|
154435
154435
|
path2,
|
|
154436
154436
|
getCompilationSettings(compilationSettings),
|
|
154437
|
-
|
|
154437
|
+
key4,
|
|
154438
154438
|
scriptSnapshot,
|
|
154439
154439
|
version22,
|
|
154440
154440
|
/*acquiring*/
|
|
@@ -154448,7 +154448,7 @@ ${lanes.join("\n")}
|
|
|
154448
154448
|
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}`);
|
|
154449
154449
|
return entry;
|
|
154450
154450
|
}
|
|
154451
|
-
function acquireOrUpdateDocument(fileName, path2, compilationSettingsOrHost,
|
|
154451
|
+
function acquireOrUpdateDocument(fileName, path2, compilationSettingsOrHost, key4, scriptSnapshot, version22, acquiring, scriptKind, languageVersionOrOptions) {
|
|
154452
154452
|
var _a3, _b, _c, _d;
|
|
154453
154453
|
scriptKind = ensureScriptKind(fileName, scriptKind);
|
|
154454
154454
|
const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
|
|
@@ -154463,7 +154463,7 @@ ${lanes.join("\n")}
|
|
|
154463
154463
|
sourceFileOptions.languageVersion = scriptTarget;
|
|
154464
154464
|
Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode);
|
|
154465
154465
|
const oldBucketCount = buckets.size;
|
|
154466
|
-
const keyWithMode = getDocumentRegistryBucketKeyWithMode(
|
|
154466
|
+
const keyWithMode = getDocumentRegistryBucketKeyWithMode(key4, sourceFileOptions.impliedNodeFormat);
|
|
154467
154467
|
const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map());
|
|
154468
154468
|
if (tracing) {
|
|
154469
154469
|
if (buckets.size > oldBucketCount) {
|
|
@@ -154533,11 +154533,11 @@ ${lanes.join("\n")}
|
|
|
154533
154533
|
}
|
|
154534
154534
|
function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
|
|
154535
154535
|
const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
154536
|
-
const
|
|
154537
|
-
return releaseDocumentWithKey(path2,
|
|
154536
|
+
const key4 = getKeyForCompilationSettings(compilationSettings);
|
|
154537
|
+
return releaseDocumentWithKey(path2, key4, scriptKind, impliedNodeFormat);
|
|
154538
154538
|
}
|
|
154539
|
-
function releaseDocumentWithKey(path2,
|
|
154540
|
-
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(
|
|
154539
|
+
function releaseDocumentWithKey(path2, key4, scriptKind, impliedNodeFormat) {
|
|
154540
|
+
const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key4, impliedNodeFormat)));
|
|
154541
154541
|
const bucketEntry = bucket.get(path2);
|
|
154542
154542
|
const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
|
|
154543
154543
|
entry.languageServiceRefCount--;
|
|
@@ -154569,8 +154569,8 @@ ${lanes.join("\n")}
|
|
|
154569
154569
|
function getKeyForCompilationSettings(settings) {
|
|
154570
154570
|
return getKeyForCompilerOptions(settings, sourceFileAffectingCompilerOptions);
|
|
154571
154571
|
}
|
|
154572
|
-
function getDocumentRegistryBucketKeyWithMode(
|
|
154573
|
-
return mode ? `${
|
|
154572
|
+
function getDocumentRegistryBucketKeyWithMode(key4, mode) {
|
|
154573
|
+
return mode ? `${key4}|${mode}` : key4;
|
|
154574
154574
|
}
|
|
154575
154575
|
function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) {
|
|
154576
154576
|
const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host);
|
|
@@ -155858,9 +155858,9 @@ interface Symbol {
|
|
|
155858
155858
|
const diagnostics = [];
|
|
155859
155859
|
const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};
|
|
155860
155860
|
const defaultOptions = getDefaultCompilerOptions2();
|
|
155861
|
-
for (const
|
|
155862
|
-
if (hasProperty(defaultOptions,
|
|
155863
|
-
options[
|
|
155861
|
+
for (const key4 in defaultOptions) {
|
|
155862
|
+
if (hasProperty(defaultOptions, key4) && options[key4] === void 0) {
|
|
155863
|
+
options[key4] = defaultOptions[key4];
|
|
155864
155864
|
}
|
|
155865
155865
|
}
|
|
155866
155866
|
for (const option of transpileOptionValueCompilerOptions) {
|
|
@@ -163302,8 +163302,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163302
163302
|
}
|
|
163303
163303
|
function toEditorSettings(optionsAsMap) {
|
|
163304
163304
|
let allPropertiesAreCamelCased = true;
|
|
163305
|
-
for (const
|
|
163306
|
-
if (hasProperty(optionsAsMap,
|
|
163305
|
+
for (const key4 in optionsAsMap) {
|
|
163306
|
+
if (hasProperty(optionsAsMap, key4) && !isCamelCase(key4)) {
|
|
163307
163307
|
allPropertiesAreCamelCased = false;
|
|
163308
163308
|
break;
|
|
163309
163309
|
}
|
|
@@ -163312,10 +163312,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163312
163312
|
return optionsAsMap;
|
|
163313
163313
|
}
|
|
163314
163314
|
const settings = {};
|
|
163315
|
-
for (const
|
|
163316
|
-
if (hasProperty(optionsAsMap,
|
|
163317
|
-
const newKey = isCamelCase(
|
|
163318
|
-
settings[newKey] = optionsAsMap[
|
|
163315
|
+
for (const key4 in optionsAsMap) {
|
|
163316
|
+
if (hasProperty(optionsAsMap, key4)) {
|
|
163317
|
+
const newKey = isCamelCase(key4) ? key4 : key4.charAt(0).toLowerCase() + key4.substr(1);
|
|
163318
|
+
settings[newKey] = optionsAsMap[key4];
|
|
163319
163319
|
}
|
|
163320
163320
|
}
|
|
163321
163321
|
return settings;
|
|
@@ -163813,8 +163813,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163813
163813
|
}
|
|
163814
163814
|
function cleanupSemanticCache() {
|
|
163815
163815
|
if (program) {
|
|
163816
|
-
const
|
|
163817
|
-
forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath,
|
|
163816
|
+
const key4 = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions());
|
|
163817
|
+
forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key4, f.scriptKind, f.impliedNodeFormat));
|
|
163818
163818
|
program = void 0;
|
|
163819
163819
|
}
|
|
163820
163820
|
}
|
|
@@ -164278,7 +164278,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164278
164278
|
]: 30
|
|
164279
164279
|
/* LessThanToken */
|
|
164280
164280
|
}));
|
|
164281
|
-
braceMatching.forEach((value,
|
|
164281
|
+
braceMatching.forEach((value, key4) => braceMatching.set(value.toString(), Number(key4)));
|
|
164282
164282
|
function getBraceMatchingAtPosition(fileName, position) {
|
|
164283
164283
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
164284
164284
|
const token = getTouchingToken(sourceFile, position);
|
|
@@ -164303,11 +164303,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164303
164303
|
function getFormattingEditsForDocument(fileName, options) {
|
|
164304
164304
|
return ts_formatting_exports.formatDocument(syntaxTreeCache.getCurrentSourceFile(fileName), ts_formatting_exports.getFormatContext(toEditorSettings(options), host));
|
|
164305
164305
|
}
|
|
164306
|
-
function getFormattingEditsAfterKeystroke(fileName, position,
|
|
164306
|
+
function getFormattingEditsAfterKeystroke(fileName, position, key4, options) {
|
|
164307
164307
|
const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
|
|
164308
164308
|
const formatContext = ts_formatting_exports.getFormatContext(toEditorSettings(options), host);
|
|
164309
164309
|
if (!isInComment(sourceFile, position)) {
|
|
164310
|
-
switch (
|
|
164310
|
+
switch (key4) {
|
|
164311
164311
|
case "{":
|
|
164312
164312
|
return ts_formatting_exports.formatOnOpeningCurly(position, sourceFile, formatContext);
|
|
164313
164313
|
case "}":
|
|
@@ -164877,15 +164877,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164877
164877
|
break;
|
|
164878
164878
|
case 1:
|
|
164879
164879
|
invalidOperationsInPartialSemanticMode.forEach(
|
|
164880
|
-
(
|
|
164881
|
-
throw new Error(`LanguageService Operation: ${
|
|
164880
|
+
(key4) => ls[key4] = () => {
|
|
164881
|
+
throw new Error(`LanguageService Operation: ${key4} not allowed in LanguageServiceMode.PartialSemantic`);
|
|
164882
164882
|
}
|
|
164883
164883
|
);
|
|
164884
164884
|
break;
|
|
164885
164885
|
case 2:
|
|
164886
164886
|
invalidOperationsInSyntacticMode.forEach(
|
|
164887
|
-
(
|
|
164888
|
-
throw new Error(`LanguageService Operation: ${
|
|
164887
|
+
(key4) => ls[key4] = () => {
|
|
164888
|
+
throw new Error(`LanguageService Operation: ${key4} not allowed in LanguageServiceMode.Syntactic`);
|
|
164889
164889
|
}
|
|
164890
164890
|
);
|
|
164891
164891
|
break;
|
|
@@ -167058,9 +167058,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167058
167058
|
});
|
|
167059
167059
|
}
|
|
167060
167060
|
if (symbol2.members) {
|
|
167061
|
-
symbol2.members.forEach((member,
|
|
167061
|
+
symbol2.members.forEach((member, key4) => {
|
|
167062
167062
|
var _a3, _b, _c, _d;
|
|
167063
|
-
if (
|
|
167063
|
+
if (key4 === "constructor" && member.valueDeclaration) {
|
|
167064
167064
|
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;
|
|
167065
167065
|
if (prototypeAssignment && isBinaryExpression(prototypeAssignment) && isObjectLiteralExpression(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) {
|
|
167066
167066
|
} else {
|
|
@@ -167543,10 +167543,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167543
167543
|
if (continuationArgName && !shouldReturn(node, transformer)) {
|
|
167544
167544
|
if (isSynthIdentifier(continuationArgName)) {
|
|
167545
167545
|
possibleNameForVarDecl = continuationArgName;
|
|
167546
|
-
transformer.synthNamesMap.forEach((val,
|
|
167546
|
+
transformer.synthNamesMap.forEach((val, key4) => {
|
|
167547
167547
|
if (val.identifier.text === continuationArgName.identifier.text) {
|
|
167548
167548
|
const newSynthName = createUniqueSynthName(continuationArgName);
|
|
167549
|
-
transformer.synthNamesMap.set(
|
|
167549
|
+
transformer.synthNamesMap.set(key4, newSynthName);
|
|
167550
167550
|
}
|
|
167551
167551
|
});
|
|
167552
167552
|
} else {
|
|
@@ -169660,8 +169660,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
169660
169660
|
);
|
|
169661
169661
|
});
|
|
169662
169662
|
let newDeclarations;
|
|
169663
|
-
newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport },
|
|
169664
|
-
const moduleSpecifier =
|
|
169663
|
+
newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport }, key4) => {
|
|
169664
|
+
const moduleSpecifier = key4.slice(2);
|
|
169665
169665
|
const getDeclarations = useRequire ? getNewRequires : getNewImports;
|
|
169666
169666
|
const declarations2 = getDeclarations(
|
|
169667
169667
|
moduleSpecifier,
|
|
@@ -176060,8 +176060,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
176060
176060
|
}
|
|
176061
176061
|
var fixName4 = "disableJsDiagnostics";
|
|
176062
176062
|
var fixId42 = "disableJsDiagnostics";
|
|
176063
|
-
var errorCodes53 = mapDefined(Object.keys(Diagnostics), (
|
|
176064
|
-
const diag2 = Diagnostics[
|
|
176063
|
+
var errorCodes53 = mapDefined(Object.keys(Diagnostics), (key4) => {
|
|
176064
|
+
const diag2 = Diagnostics[key4];
|
|
176065
176065
|
return diag2.category === 1 ? diag2.code : void 0;
|
|
176066
176066
|
});
|
|
176067
176067
|
registerCodeFix({
|
|
@@ -182784,7 +182784,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182784
182784
|
return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath2(name) };
|
|
182785
182785
|
}
|
|
182786
182786
|
function addCompletionEntriesFromPaths(result3, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, paths) {
|
|
182787
|
-
const getPatternsForKey = (
|
|
182787
|
+
const getPatternsForKey = (key4) => paths[key4];
|
|
182788
182788
|
const comparePaths2 = (a, b) => {
|
|
182789
182789
|
const patternA = tryParsePattern(a);
|
|
182790
182790
|
const patternB = tryParsePattern(b);
|
|
@@ -182812,10 +182812,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182812
182812
|
function addCompletionEntriesFromPathsOrExportsOrImports(result3, isExports, isImports, fragment, baseDirectory, extensionOptions, program, host, moduleSpecifierResolutionHost, keys, getPatternsForKey, comparePaths2) {
|
|
182813
182813
|
let pathResults = [];
|
|
182814
182814
|
let matchedPath;
|
|
182815
|
-
for (const
|
|
182816
|
-
if (
|
|
182817
|
-
const keyWithoutLeadingDotSlash =
|
|
182818
|
-
const patterns = getPatternsForKey(
|
|
182815
|
+
for (const key4 of keys) {
|
|
182816
|
+
if (key4 === ".") continue;
|
|
182817
|
+
const keyWithoutLeadingDotSlash = key4.replace(/^\.\//, "") + ((isExports || isImports) && endsWith(key4, "/") ? "*" : "");
|
|
182818
|
+
const patterns = getPatternsForKey(key4);
|
|
182819
182819
|
if (patterns) {
|
|
182820
182820
|
const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash);
|
|
182821
182821
|
if (!pathPattern) continue;
|
|
@@ -182988,12 +182988,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
182988
182988
|
host,
|
|
182989
182989
|
moduleSpecifierResolutionHost,
|
|
182990
182990
|
keys,
|
|
182991
|
-
(
|
|
182992
|
-
const pattern = getPatternFromFirstMatchingCondition(lookupTable[
|
|
182991
|
+
(key4) => {
|
|
182992
|
+
const pattern = getPatternFromFirstMatchingCondition(lookupTable[key4], conditions);
|
|
182993
182993
|
if (pattern === void 0) {
|
|
182994
182994
|
return void 0;
|
|
182995
182995
|
}
|
|
182996
|
-
return singleElementArray(endsWith(
|
|
182996
|
+
return singleElementArray(endsWith(key4, "/") && endsWith(pattern, "/") ? pattern + "*" : pattern);
|
|
182997
182997
|
},
|
|
182998
182998
|
comparePatternKeys
|
|
182999
182999
|
);
|
|
@@ -183220,8 +183220,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
183220
183220
|
const result3 = [];
|
|
183221
183221
|
for (const packageJson of findPackageJsons(scriptPath, host)) {
|
|
183222
183222
|
const contents = readJson(packageJson, host);
|
|
183223
|
-
for (const
|
|
183224
|
-
const dependencies = contents[
|
|
183223
|
+
for (const key4 of nodeModulesDependencyKeys) {
|
|
183224
|
+
const dependencies = contents[key4];
|
|
183225
183225
|
if (!dependencies) continue;
|
|
183226
183226
|
for (const dep in dependencies) {
|
|
183227
183227
|
if (hasProperty(dependencies, dep) && !startsWith(dep, "@types/")) {
|
|
@@ -185425,19 +185425,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
185425
185425
|
if (symbol2 === parent2) {
|
|
185426
185426
|
return true;
|
|
185427
185427
|
}
|
|
185428
|
-
const
|
|
185429
|
-
const cached2 = cachedResults.get(
|
|
185428
|
+
const key4 = getSymbolId(symbol2) + "," + getSymbolId(parent2);
|
|
185429
|
+
const cached2 = cachedResults.get(key4);
|
|
185430
185430
|
if (cached2 !== void 0) {
|
|
185431
185431
|
return cached2;
|
|
185432
185432
|
}
|
|
185433
|
-
cachedResults.set(
|
|
185433
|
+
cachedResults.set(key4, false);
|
|
185434
185434
|
const inherits = !!symbol2.declarations && symbol2.declarations.some(
|
|
185435
185435
|
(declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => {
|
|
185436
185436
|
const type = checker.getTypeAtLocation(typeReference);
|
|
185437
185437
|
return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker);
|
|
185438
185438
|
})
|
|
185439
185439
|
);
|
|
185440
|
-
cachedResults.set(
|
|
185440
|
+
cachedResults.set(key4, inherits);
|
|
185441
185441
|
return inherits;
|
|
185442
185442
|
}
|
|
185443
185443
|
function getReferencesForSuperKeyword(superKeyword) {
|
|
@@ -188392,8 +188392,8 @@ ${content}
|
|
|
188392
188392
|
currDiff[typeOrder] = (currDiff[typeOrder] ?? 0) + measureSortedness(importDecl, (n1, n2) => compareImportOrExportSpecifiers(n1, n2, curComparer, { organizeImportsTypeOrder: typeOrder }));
|
|
188393
188393
|
}
|
|
188394
188394
|
}
|
|
188395
|
-
for (const
|
|
188396
|
-
const typeOrder =
|
|
188395
|
+
for (const key4 of typesToTest) {
|
|
188396
|
+
const typeOrder = key4;
|
|
188397
188397
|
if (currDiff[typeOrder] < bestDiff[typeOrder]) {
|
|
188398
188398
|
bestDiff[typeOrder] = currDiff[typeOrder];
|
|
188399
188399
|
bestComparer[typeOrder] = curComparer;
|
|
@@ -198635,8 +198635,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198635
198635
|
function createOverload(name, overloads, binder2, deprecations) {
|
|
198636
198636
|
Object.defineProperty(call, "name", { ...Object.getOwnPropertyDescriptor(call, "name"), value: name });
|
|
198637
198637
|
if (deprecations) {
|
|
198638
|
-
for (const
|
|
198639
|
-
const index = +
|
|
198638
|
+
for (const key4 of Object.keys(deprecations)) {
|
|
198639
|
+
const index = +key4;
|
|
198640
198640
|
if (!isNaN(index) && hasProperty(overloads, `${index}`)) {
|
|
198641
198641
|
overloads[index] = deprecate(overloads[index], { ...deprecations[index], name });
|
|
198642
198642
|
}
|
|
@@ -198852,8 +198852,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198852
198852
|
break;
|
|
198853
198853
|
case "typesRegistry": {
|
|
198854
198854
|
const typesRegistry = {};
|
|
198855
|
-
this.typesRegistry.forEach((value,
|
|
198856
|
-
typesRegistry[
|
|
198855
|
+
this.typesRegistry.forEach((value, key4) => {
|
|
198856
|
+
typesRegistry[key4] = value;
|
|
198857
198857
|
});
|
|
198858
198858
|
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
198859
198859
|
this.sendResponse(response);
|
|
@@ -199004,11 +199004,11 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199004
199004
|
this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`);
|
|
199005
199005
|
}
|
|
199006
199006
|
if (npmConfig.devDependencies && (npmLock.packages || npmLock.dependencies)) {
|
|
199007
|
-
for (const
|
|
199008
|
-
if (npmLock.packages && !hasProperty(npmLock.packages, `node_modules/${
|
|
199007
|
+
for (const key4 in npmConfig.devDependencies) {
|
|
199008
|
+
if (npmLock.packages && !hasProperty(npmLock.packages, `node_modules/${key4}`) || npmLock.dependencies && !hasProperty(npmLock.dependencies, key4)) {
|
|
199009
199009
|
continue;
|
|
199010
199010
|
}
|
|
199011
|
-
const packageName = getBaseFileName(
|
|
199011
|
+
const packageName = getBaseFileName(key4);
|
|
199012
199012
|
if (!packageName) {
|
|
199013
199013
|
continue;
|
|
199014
199014
|
}
|
|
@@ -199029,7 +199029,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199029
199029
|
if (this.log.isEnabled()) {
|
|
199030
199030
|
this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`);
|
|
199031
199031
|
}
|
|
199032
|
-
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${
|
|
199032
|
+
const info = npmLock.packages && getProperty(npmLock.packages, `node_modules/${key4}`) || getProperty(npmLock.dependencies, key4);
|
|
199033
199033
|
const version22 = info && info.version;
|
|
199034
199034
|
if (!version22) {
|
|
199035
199035
|
continue;
|
|
@@ -202983,9 +202983,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202983
202983
|
);
|
|
202984
202984
|
}
|
|
202985
202985
|
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path2, callback, event) {
|
|
202986
|
-
const
|
|
202987
|
-
let id = pathToId.get(
|
|
202988
|
-
if (!id) pathToId.set(
|
|
202986
|
+
const key4 = service.toPath(path2);
|
|
202987
|
+
let id = pathToId.get(key4);
|
|
202988
|
+
if (!id) pathToId.set(key4, id = ids++);
|
|
202989
202989
|
let callbacks = idToCallbacks.get(id);
|
|
202990
202990
|
if (!callbacks) {
|
|
202991
202991
|
idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set());
|
|
@@ -202998,7 +202998,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
202998
202998
|
if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback))) return;
|
|
202999
202999
|
if (callbacks2.size) return;
|
|
203000
203000
|
idToCallbacks.delete(id);
|
|
203001
|
-
pathToId.delete(
|
|
203001
|
+
pathToId.delete(key4);
|
|
203002
203002
|
service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } });
|
|
203003
203003
|
}
|
|
203004
203004
|
};
|
|
@@ -203152,14 +203152,14 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203152
203152
|
return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
|
|
203153
203153
|
}
|
|
203154
203154
|
/** @internal */
|
|
203155
|
-
setDocument(
|
|
203155
|
+
setDocument(key4, path2, sourceFile) {
|
|
203156
203156
|
const info = Debug.checkDefined(this.getScriptInfoForPath(path2));
|
|
203157
|
-
info.cacheSourceFile = { key:
|
|
203157
|
+
info.cacheSourceFile = { key: key4, sourceFile };
|
|
203158
203158
|
}
|
|
203159
203159
|
/** @internal */
|
|
203160
|
-
getDocument(
|
|
203160
|
+
getDocument(key4, path2) {
|
|
203161
203161
|
const info = this.getScriptInfoForPath(path2);
|
|
203162
|
-
return info && info.cacheSourceFile && info.cacheSourceFile.key ===
|
|
203162
|
+
return info && info.cacheSourceFile && info.cacheSourceFile.key === key4 ? info.cacheSourceFile.sourceFile : void 0;
|
|
203163
203163
|
}
|
|
203164
203164
|
/** @internal */
|
|
203165
203165
|
ensureInferredProjectsUpToDate_TestOnly() {
|
|
@@ -203192,9 +203192,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
203192
203192
|
raw.typesMap[k].match = new RegExp(raw.typesMap[k].match, "i");
|
|
203193
203193
|
}
|
|
203194
203194
|
this.safelist = raw.typesMap;
|
|
203195
|
-
for (const
|
|
203196
|
-
if (hasProperty(raw.simpleMap,
|
|
203197
|
-
this.legacySafelist.set(
|
|
203195
|
+
for (const key4 in raw.simpleMap) {
|
|
203196
|
+
if (hasProperty(raw.simpleMap, key4)) {
|
|
203197
|
+
this.legacySafelist.set(key4, raw.simpleMap[key4].toLowerCase());
|
|
203198
203198
|
}
|
|
203199
203199
|
}
|
|
203200
203200
|
} catch (e) {
|
|
@@ -205715,7 +205715,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
205715
205715
|
/** @internal */
|
|
205716
205716
|
loadAncestorProjectTree(forProjects) {
|
|
205717
205717
|
forProjects ?? (forProjects = new Set(
|
|
205718
|
-
mapDefinedIterator(this.configuredProjects.entries(), ([
|
|
205718
|
+
mapDefinedIterator(this.configuredProjects.entries(), ([key4, project]) => !project.initialLoadPending ? key4 : void 0)
|
|
205719
205719
|
));
|
|
205720
205720
|
const seenProjects = /* @__PURE__ */ new Set();
|
|
205721
205721
|
const currentConfiguredProjects = arrayFrom(this.configuredProjects.values());
|
|
@@ -206487,7 +206487,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
206487
206487
|
let currentKey;
|
|
206488
206488
|
const result3 = {
|
|
206489
206489
|
get(fromFileName, toFileName2, preferences, options) {
|
|
206490
|
-
if (!cache || currentKey !==
|
|
206490
|
+
if (!cache || currentKey !== key4(fromFileName, preferences, options)) return void 0;
|
|
206491
206491
|
return cache.get(toFileName2);
|
|
206492
206492
|
},
|
|
206493
206493
|
set(fromFileName, toFileName2, preferences, options, kind, modulePaths, moduleSpecifiers2) {
|
|
@@ -206568,14 +206568,14 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
206568
206568
|
}
|
|
206569
206569
|
return result3;
|
|
206570
206570
|
function ensureCache(fromFileName, preferences, options) {
|
|
206571
|
-
const newKey =
|
|
206571
|
+
const newKey = key4(fromFileName, preferences, options);
|
|
206572
206572
|
if (cache && currentKey !== newKey) {
|
|
206573
206573
|
result3.clear();
|
|
206574
206574
|
}
|
|
206575
206575
|
currentKey = newKey;
|
|
206576
206576
|
return cache || (cache = /* @__PURE__ */ new Map());
|
|
206577
206577
|
}
|
|
206578
|
-
function
|
|
206578
|
+
function key4(fromFileName, preferences, options) {
|
|
206579
206579
|
return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`;
|
|
206580
206580
|
}
|
|
206581
206581
|
function createInfo(kind, modulePaths, moduleSpecifiers2, packageName, isBlockedByPackageJsonDependencies) {
|
|
@@ -208235,11 +208235,11 @@ ${json2}${newLine}`;
|
|
|
208235
208235
|
"requestCompleted"
|
|
208236
208236
|
);
|
|
208237
208237
|
}
|
|
208238
|
-
addPerformanceData(
|
|
208238
|
+
addPerformanceData(key4, value) {
|
|
208239
208239
|
if (!this.performanceData) {
|
|
208240
208240
|
this.performanceData = {};
|
|
208241
208241
|
}
|
|
208242
|
-
this.performanceData[
|
|
208242
|
+
this.performanceData[key4] = (this.performanceData[key4] ?? 0) + value;
|
|
208243
208243
|
}
|
|
208244
208244
|
addDiagnosticsPerformanceData(file2, kind, duration3) {
|
|
208245
208245
|
var _a3, _b;
|
|
@@ -211649,11 +211649,11 @@ var require_visit = __commonJS({
|
|
|
211649
211649
|
visit.BREAK = BREAK;
|
|
211650
211650
|
visit.SKIP = SKIP;
|
|
211651
211651
|
visit.REMOVE = REMOVE;
|
|
211652
|
-
function visit_(
|
|
211653
|
-
const ctrl = callVisitor(
|
|
211652
|
+
function visit_(key4, node, visitor, path2) {
|
|
211653
|
+
const ctrl = callVisitor(key4, node, visitor, path2);
|
|
211654
211654
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
211655
|
-
replaceNode(
|
|
211656
|
-
return visit_(
|
|
211655
|
+
replaceNode(key4, path2, ctrl);
|
|
211656
|
+
return visit_(key4, ctrl, visitor, path2);
|
|
211657
211657
|
}
|
|
211658
211658
|
if (typeof ctrl !== "symbol") {
|
|
211659
211659
|
if (identity.isCollection(node)) {
|
|
@@ -211697,11 +211697,11 @@ var require_visit = __commonJS({
|
|
|
211697
211697
|
visitAsync.BREAK = BREAK;
|
|
211698
211698
|
visitAsync.SKIP = SKIP;
|
|
211699
211699
|
visitAsync.REMOVE = REMOVE;
|
|
211700
|
-
async function visitAsync_(
|
|
211701
|
-
const ctrl = await callVisitor(
|
|
211700
|
+
async function visitAsync_(key4, node, visitor, path2) {
|
|
211701
|
+
const ctrl = await callVisitor(key4, node, visitor, path2);
|
|
211702
211702
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
211703
|
-
replaceNode(
|
|
211704
|
-
return visitAsync_(
|
|
211703
|
+
replaceNode(key4, path2, ctrl);
|
|
211704
|
+
return visitAsync_(key4, ctrl, visitor, path2);
|
|
211705
211705
|
}
|
|
211706
211706
|
if (typeof ctrl !== "symbol") {
|
|
211707
211707
|
if (identity.isCollection(node)) {
|
|
@@ -211751,27 +211751,27 @@ var require_visit = __commonJS({
|
|
|
211751
211751
|
}
|
|
211752
211752
|
return visitor;
|
|
211753
211753
|
}
|
|
211754
|
-
function callVisitor(
|
|
211754
|
+
function callVisitor(key4, node, visitor, path2) {
|
|
211755
211755
|
if (typeof visitor === "function")
|
|
211756
|
-
return visitor(
|
|
211756
|
+
return visitor(key4, node, path2);
|
|
211757
211757
|
if (identity.isMap(node))
|
|
211758
|
-
return visitor.Map?.(
|
|
211758
|
+
return visitor.Map?.(key4, node, path2);
|
|
211759
211759
|
if (identity.isSeq(node))
|
|
211760
|
-
return visitor.Seq?.(
|
|
211760
|
+
return visitor.Seq?.(key4, node, path2);
|
|
211761
211761
|
if (identity.isPair(node))
|
|
211762
|
-
return visitor.Pair?.(
|
|
211762
|
+
return visitor.Pair?.(key4, node, path2);
|
|
211763
211763
|
if (identity.isScalar(node))
|
|
211764
|
-
return visitor.Scalar?.(
|
|
211764
|
+
return visitor.Scalar?.(key4, node, path2);
|
|
211765
211765
|
if (identity.isAlias(node))
|
|
211766
|
-
return visitor.Alias?.(
|
|
211766
|
+
return visitor.Alias?.(key4, node, path2);
|
|
211767
211767
|
return void 0;
|
|
211768
211768
|
}
|
|
211769
|
-
function replaceNode(
|
|
211769
|
+
function replaceNode(key4, path2, node) {
|
|
211770
211770
|
const parent = path2[path2.length - 1];
|
|
211771
211771
|
if (identity.isCollection(parent)) {
|
|
211772
|
-
parent.items[
|
|
211772
|
+
parent.items[key4] = node;
|
|
211773
211773
|
} else if (identity.isPair(parent)) {
|
|
211774
|
-
if (
|
|
211774
|
+
if (key4 === "key")
|
|
211775
211775
|
parent.key = node;
|
|
211776
211776
|
else
|
|
211777
211777
|
parent.value = node;
|
|
@@ -212032,7 +212032,7 @@ var require_anchors = __commonJS({
|
|
|
212032
212032
|
var require_applyReviver = __commonJS({
|
|
212033
212033
|
"node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
212034
212034
|
"use strict";
|
|
212035
|
-
function applyReviver(reviver, obj,
|
|
212035
|
+
function applyReviver(reviver, obj, key4, val) {
|
|
212036
212036
|
if (val && typeof val === "object") {
|
|
212037
212037
|
if (Array.isArray(val)) {
|
|
212038
212038
|
for (let i = 0, len = val.length; i < len; ++i) {
|
|
@@ -212072,7 +212072,7 @@ var require_applyReviver = __commonJS({
|
|
|
212072
212072
|
}
|
|
212073
212073
|
}
|
|
212074
212074
|
}
|
|
212075
|
-
return reviver.call(obj,
|
|
212075
|
+
return reviver.call(obj, key4, val);
|
|
212076
212076
|
}
|
|
212077
212077
|
exports.applyReviver = applyReviver;
|
|
212078
212078
|
}
|
|
@@ -212433,14 +212433,14 @@ var require_Collection = __commonJS({
|
|
|
212433
212433
|
if (isEmptyPath(path2))
|
|
212434
212434
|
this.add(value);
|
|
212435
212435
|
else {
|
|
212436
|
-
const [
|
|
212437
|
-
const node = this.get(
|
|
212436
|
+
const [key4, ...rest] = path2;
|
|
212437
|
+
const node = this.get(key4, true);
|
|
212438
212438
|
if (identity.isCollection(node))
|
|
212439
212439
|
node.addIn(rest, value);
|
|
212440
212440
|
else if (node === void 0 && this.schema)
|
|
212441
|
-
this.set(
|
|
212441
|
+
this.set(key4, collectionFromPath(this.schema, rest, value));
|
|
212442
212442
|
else
|
|
212443
|
-
throw new Error(`Expected YAML collection at ${
|
|
212443
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
|
212444
212444
|
}
|
|
212445
212445
|
}
|
|
212446
212446
|
/**
|
|
@@ -212448,14 +212448,14 @@ var require_Collection = __commonJS({
|
|
|
212448
212448
|
* @returns `true` if the item was found and removed.
|
|
212449
212449
|
*/
|
|
212450
212450
|
deleteIn(path2) {
|
|
212451
|
-
const [
|
|
212451
|
+
const [key4, ...rest] = path2;
|
|
212452
212452
|
if (rest.length === 0)
|
|
212453
|
-
return this.delete(
|
|
212454
|
-
const node = this.get(
|
|
212453
|
+
return this.delete(key4);
|
|
212454
|
+
const node = this.get(key4, true);
|
|
212455
212455
|
if (identity.isCollection(node))
|
|
212456
212456
|
return node.deleteIn(rest);
|
|
212457
212457
|
else
|
|
212458
|
-
throw new Error(`Expected YAML collection at ${
|
|
212458
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
|
212459
212459
|
}
|
|
212460
212460
|
/**
|
|
212461
212461
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -212463,8 +212463,8 @@ var require_Collection = __commonJS({
|
|
|
212463
212463
|
* `true` (collections are always returned intact).
|
|
212464
212464
|
*/
|
|
212465
212465
|
getIn(path2, keepScalar) {
|
|
212466
|
-
const [
|
|
212467
|
-
const node = this.get(
|
|
212466
|
+
const [key4, ...rest] = path2;
|
|
212467
|
+
const node = this.get(key4, true);
|
|
212468
212468
|
if (rest.length === 0)
|
|
212469
212469
|
return !keepScalar && identity.isScalar(node) ? node.value : node;
|
|
212470
212470
|
else
|
|
@@ -212482,10 +212482,10 @@ var require_Collection = __commonJS({
|
|
|
212482
212482
|
* Checks if the collection includes a value with the key `key`.
|
|
212483
212483
|
*/
|
|
212484
212484
|
hasIn(path2) {
|
|
212485
|
-
const [
|
|
212485
|
+
const [key4, ...rest] = path2;
|
|
212486
212486
|
if (rest.length === 0)
|
|
212487
|
-
return this.has(
|
|
212488
|
-
const node = this.get(
|
|
212487
|
+
return this.has(key4);
|
|
212488
|
+
const node = this.get(key4, true);
|
|
212489
212489
|
return identity.isCollection(node) ? node.hasIn(rest) : false;
|
|
212490
212490
|
}
|
|
212491
212491
|
/**
|
|
@@ -212493,17 +212493,17 @@ var require_Collection = __commonJS({
|
|
|
212493
212493
|
* boolean to add/remove the item from the set.
|
|
212494
212494
|
*/
|
|
212495
212495
|
setIn(path2, value) {
|
|
212496
|
-
const [
|
|
212496
|
+
const [key4, ...rest] = path2;
|
|
212497
212497
|
if (rest.length === 0) {
|
|
212498
|
-
this.set(
|
|
212498
|
+
this.set(key4, value);
|
|
212499
212499
|
} else {
|
|
212500
|
-
const node = this.get(
|
|
212500
|
+
const node = this.get(key4, true);
|
|
212501
212501
|
if (identity.isCollection(node))
|
|
212502
212502
|
node.setIn(rest, value);
|
|
212503
212503
|
else if (node === void 0 && this.schema)
|
|
212504
|
-
this.set(
|
|
212504
|
+
this.set(key4, collectionFromPath(this.schema, rest, value));
|
|
212505
212505
|
else
|
|
212506
|
-
throw new Error(`Expected YAML collection at ${
|
|
212506
|
+
throw new Error(`Expected YAML collection at ${key4}. Remaining path: ${rest}`);
|
|
212507
212507
|
}
|
|
212508
212508
|
}
|
|
212509
212509
|
};
|
|
@@ -213081,19 +213081,19 @@ var require_stringifyPair = __commonJS({
|
|
|
213081
213081
|
var Scalar = require_Scalar();
|
|
213082
213082
|
var stringify = require_stringify();
|
|
213083
213083
|
var stringifyComment = require_stringifyComment();
|
|
213084
|
-
function stringifyPair({ key:
|
|
213084
|
+
function stringifyPair({ key: key4, value }, ctx, onComment, onChompKeep) {
|
|
213085
213085
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
213086
|
-
let keyComment = identity.isNode(
|
|
213086
|
+
let keyComment = identity.isNode(key4) && key4.comment || null;
|
|
213087
213087
|
if (simpleKeys) {
|
|
213088
213088
|
if (keyComment) {
|
|
213089
213089
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
213090
213090
|
}
|
|
213091
|
-
if (identity.isCollection(
|
|
213091
|
+
if (identity.isCollection(key4) || !identity.isNode(key4) && typeof key4 === "object") {
|
|
213092
213092
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
213093
213093
|
throw new Error(msg);
|
|
213094
213094
|
}
|
|
213095
213095
|
}
|
|
213096
|
-
let explicitKey = !simpleKeys && (!
|
|
213096
|
+
let explicitKey = !simpleKeys && (!key4 || keyComment && value == null && !ctx.inFlow || identity.isCollection(key4) || (identity.isScalar(key4) ? key4.type === Scalar.Scalar.BLOCK_FOLDED || key4.type === Scalar.Scalar.BLOCK_LITERAL : typeof key4 === "object"));
|
|
213097
213097
|
ctx = Object.assign({}, ctx, {
|
|
213098
213098
|
allNullValues: false,
|
|
213099
213099
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -213101,7 +213101,7 @@ var require_stringifyPair = __commonJS({
|
|
|
213101
213101
|
});
|
|
213102
213102
|
let keyCommentDone = false;
|
|
213103
213103
|
let chompKeep = false;
|
|
213104
|
-
let str = stringify.stringify(
|
|
213104
|
+
let str = stringify.stringify(key4, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
213105
213105
|
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
213106
213106
|
if (simpleKeys)
|
|
213107
213107
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
@@ -213245,7 +213245,7 @@ var require_merge = __commonJS({
|
|
|
213245
213245
|
}),
|
|
213246
213246
|
stringify: () => MERGE_KEY
|
|
213247
213247
|
};
|
|
213248
|
-
var isMergeKey = (ctx,
|
|
213248
|
+
var isMergeKey = (ctx, key4) => (merge2.identify(key4) || identity.isScalar(key4) && (!key4.type || key4.type === Scalar.Scalar.PLAIN) && merge2.identify(key4.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
213249
213249
|
function addMergeToJSMap(ctx, map2, value) {
|
|
213250
213250
|
const source = resolveAliasValue(ctx, value);
|
|
213251
213251
|
if (identity.isSeq(source))
|
|
@@ -213262,14 +213262,14 @@ var require_merge = __commonJS({
|
|
|
213262
213262
|
if (!identity.isMap(source))
|
|
213263
213263
|
throw new Error("Merge sources must be maps or map aliases");
|
|
213264
213264
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
213265
|
-
for (const [
|
|
213265
|
+
for (const [key4, value2] of srcMap) {
|
|
213266
213266
|
if (map2 instanceof Map) {
|
|
213267
|
-
if (!map2.has(
|
|
213268
|
-
map2.set(
|
|
213267
|
+
if (!map2.has(key4))
|
|
213268
|
+
map2.set(key4, value2);
|
|
213269
213269
|
} else if (map2 instanceof Set) {
|
|
213270
|
-
map2.add(
|
|
213271
|
-
} else if (!Object.prototype.hasOwnProperty.call(map2,
|
|
213272
|
-
Object.defineProperty(map2,
|
|
213270
|
+
map2.add(key4);
|
|
213271
|
+
} else if (!Object.prototype.hasOwnProperty.call(map2, key4)) {
|
|
213272
|
+
Object.defineProperty(map2, key4, {
|
|
213273
213273
|
value: value2,
|
|
213274
213274
|
writable: true,
|
|
213275
213275
|
enumerable: true,
|
|
@@ -213297,19 +213297,19 @@ var require_addPairToJSMap = __commonJS({
|
|
|
213297
213297
|
var stringify = require_stringify();
|
|
213298
213298
|
var identity = require_identity();
|
|
213299
213299
|
var toJS = require_toJS();
|
|
213300
|
-
function addPairToJSMap(ctx, map2, { key:
|
|
213301
|
-
if (identity.isNode(
|
|
213302
|
-
|
|
213303
|
-
else if (merge2.isMergeKey(ctx,
|
|
213300
|
+
function addPairToJSMap(ctx, map2, { key: key4, value }) {
|
|
213301
|
+
if (identity.isNode(key4) && key4.addToJSMap)
|
|
213302
|
+
key4.addToJSMap(ctx, map2, value);
|
|
213303
|
+
else if (merge2.isMergeKey(ctx, key4))
|
|
213304
213304
|
merge2.addMergeToJSMap(ctx, map2, value);
|
|
213305
213305
|
else {
|
|
213306
|
-
const jsKey = toJS.toJS(
|
|
213306
|
+
const jsKey = toJS.toJS(key4, "", ctx);
|
|
213307
213307
|
if (map2 instanceof Map) {
|
|
213308
213308
|
map2.set(jsKey, toJS.toJS(value, jsKey, ctx));
|
|
213309
213309
|
} else if (map2 instanceof Set) {
|
|
213310
213310
|
map2.add(jsKey);
|
|
213311
213311
|
} else {
|
|
213312
|
-
const stringKey = stringifyKey(
|
|
213312
|
+
const stringKey = stringifyKey(key4, jsKey, ctx);
|
|
213313
213313
|
const jsValue = toJS.toJS(value, stringKey, ctx);
|
|
213314
213314
|
if (stringKey in map2)
|
|
213315
213315
|
Object.defineProperty(map2, stringKey, {
|
|
@@ -213324,19 +213324,19 @@ var require_addPairToJSMap = __commonJS({
|
|
|
213324
213324
|
}
|
|
213325
213325
|
return map2;
|
|
213326
213326
|
}
|
|
213327
|
-
function stringifyKey(
|
|
213327
|
+
function stringifyKey(key4, jsKey, ctx) {
|
|
213328
213328
|
if (jsKey === null)
|
|
213329
213329
|
return "";
|
|
213330
213330
|
if (typeof jsKey !== "object")
|
|
213331
213331
|
return String(jsKey);
|
|
213332
|
-
if (identity.isNode(
|
|
213332
|
+
if (identity.isNode(key4) && ctx?.doc) {
|
|
213333
213333
|
const strCtx = stringify.createStringifyContext(ctx.doc, {});
|
|
213334
213334
|
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
213335
213335
|
for (const node of ctx.anchors.keys())
|
|
213336
213336
|
strCtx.anchors.add(node.anchor);
|
|
213337
213337
|
strCtx.inFlow = true;
|
|
213338
213338
|
strCtx.inStringifyKey = true;
|
|
213339
|
-
const strKey =
|
|
213339
|
+
const strKey = key4.toString(strCtx);
|
|
213340
213340
|
if (!ctx.mapKeyWarned) {
|
|
213341
213341
|
let jsonStr = JSON.stringify(strKey);
|
|
213342
213342
|
if (jsonStr.length > 40)
|
|
@@ -213360,24 +213360,24 @@ var require_Pair = __commonJS({
|
|
|
213360
213360
|
var stringifyPair = require_stringifyPair();
|
|
213361
213361
|
var addPairToJSMap = require_addPairToJSMap();
|
|
213362
213362
|
var identity = require_identity();
|
|
213363
|
-
function createPair(
|
|
213364
|
-
const k = createNode.createNode(
|
|
213363
|
+
function createPair(key4, value, ctx) {
|
|
213364
|
+
const k = createNode.createNode(key4, void 0, ctx);
|
|
213365
213365
|
const v = createNode.createNode(value, void 0, ctx);
|
|
213366
213366
|
return new Pair(k, v);
|
|
213367
213367
|
}
|
|
213368
213368
|
var Pair = class _Pair {
|
|
213369
|
-
constructor(
|
|
213369
|
+
constructor(key4, value = null) {
|
|
213370
213370
|
Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
|
|
213371
|
-
this.key =
|
|
213371
|
+
this.key = key4;
|
|
213372
213372
|
this.value = value;
|
|
213373
213373
|
}
|
|
213374
213374
|
clone(schema) {
|
|
213375
|
-
let { key:
|
|
213376
|
-
if (identity.isNode(
|
|
213377
|
-
|
|
213375
|
+
let { key: key4, value } = this;
|
|
213376
|
+
if (identity.isNode(key4))
|
|
213377
|
+
key4 = key4.clone(schema);
|
|
213378
213378
|
if (identity.isNode(value))
|
|
213379
213379
|
value = value.clone(schema);
|
|
213380
|
-
return new _Pair(
|
|
213380
|
+
return new _Pair(key4, value);
|
|
213381
213381
|
}
|
|
213382
213382
|
toJSON(_, ctx) {
|
|
213383
213383
|
const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
@@ -213553,11 +213553,11 @@ var require_YAMLMap = __commonJS({
|
|
|
213553
213553
|
var identity = require_identity();
|
|
213554
213554
|
var Pair = require_Pair();
|
|
213555
213555
|
var Scalar = require_Scalar();
|
|
213556
|
-
function findPair(items,
|
|
213557
|
-
const k = identity.isScalar(
|
|
213556
|
+
function findPair(items, key4) {
|
|
213557
|
+
const k = identity.isScalar(key4) ? key4.value : key4;
|
|
213558
213558
|
for (const it of items) {
|
|
213559
213559
|
if (identity.isPair(it)) {
|
|
213560
|
-
if (it.key ===
|
|
213560
|
+
if (it.key === key4 || it.key === k)
|
|
213561
213561
|
return it;
|
|
213562
213562
|
if (identity.isScalar(it.key) && it.key.value === k)
|
|
213563
213563
|
return it;
|
|
@@ -213580,20 +213580,20 @@ var require_YAMLMap = __commonJS({
|
|
|
213580
213580
|
static from(schema, obj, ctx) {
|
|
213581
213581
|
const { keepUndefined, replacer } = ctx;
|
|
213582
213582
|
const map2 = new this(schema);
|
|
213583
|
-
const add = (
|
|
213583
|
+
const add = (key4, value) => {
|
|
213584
213584
|
if (typeof replacer === "function")
|
|
213585
|
-
value = replacer.call(obj,
|
|
213586
|
-
else if (Array.isArray(replacer) && !replacer.includes(
|
|
213585
|
+
value = replacer.call(obj, key4, value);
|
|
213586
|
+
else if (Array.isArray(replacer) && !replacer.includes(key4))
|
|
213587
213587
|
return;
|
|
213588
213588
|
if (value !== void 0 || keepUndefined)
|
|
213589
|
-
map2.items.push(Pair.createPair(
|
|
213589
|
+
map2.items.push(Pair.createPair(key4, value, ctx));
|
|
213590
213590
|
};
|
|
213591
213591
|
if (obj instanceof Map) {
|
|
213592
|
-
for (const [
|
|
213593
|
-
add(
|
|
213592
|
+
for (const [key4, value] of obj)
|
|
213593
|
+
add(key4, value);
|
|
213594
213594
|
} else if (obj && typeof obj === "object") {
|
|
213595
|
-
for (const
|
|
213596
|
-
add(
|
|
213595
|
+
for (const key4 of Object.keys(obj))
|
|
213596
|
+
add(key4, obj[key4]);
|
|
213597
213597
|
}
|
|
213598
213598
|
if (typeof schema.sortMapEntries === "function") {
|
|
213599
213599
|
map2.items.sort(schema.sortMapEntries);
|
|
@@ -213633,23 +213633,23 @@ var require_YAMLMap = __commonJS({
|
|
|
213633
213633
|
this.items.push(_pair);
|
|
213634
213634
|
}
|
|
213635
213635
|
}
|
|
213636
|
-
delete(
|
|
213637
|
-
const it = findPair(this.items,
|
|
213636
|
+
delete(key4) {
|
|
213637
|
+
const it = findPair(this.items, key4);
|
|
213638
213638
|
if (!it)
|
|
213639
213639
|
return false;
|
|
213640
213640
|
const del = this.items.splice(this.items.indexOf(it), 1);
|
|
213641
213641
|
return del.length > 0;
|
|
213642
213642
|
}
|
|
213643
|
-
get(
|
|
213644
|
-
const it = findPair(this.items,
|
|
213643
|
+
get(key4, keepScalar) {
|
|
213644
|
+
const it = findPair(this.items, key4);
|
|
213645
213645
|
const node = it?.value;
|
|
213646
213646
|
return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0;
|
|
213647
213647
|
}
|
|
213648
|
-
has(
|
|
213649
|
-
return !!findPair(this.items,
|
|
213648
|
+
has(key4) {
|
|
213649
|
+
return !!findPair(this.items, key4);
|
|
213650
213650
|
}
|
|
213651
|
-
set(
|
|
213652
|
-
this.add(new Pair.Pair(
|
|
213651
|
+
set(key4, value) {
|
|
213652
|
+
this.add(new Pair.Pair(key4, value), true);
|
|
213653
213653
|
}
|
|
213654
213654
|
/**
|
|
213655
213655
|
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
@@ -213738,15 +213738,15 @@ var require_YAMLSeq = __commonJS({
|
|
|
213738
213738
|
*
|
|
213739
213739
|
* @returns `true` if the item was found and removed.
|
|
213740
213740
|
*/
|
|
213741
|
-
delete(
|
|
213742
|
-
const idx = asItemIndex(
|
|
213741
|
+
delete(key4) {
|
|
213742
|
+
const idx = asItemIndex(key4);
|
|
213743
213743
|
if (typeof idx !== "number")
|
|
213744
213744
|
return false;
|
|
213745
213745
|
const del = this.items.splice(idx, 1);
|
|
213746
213746
|
return del.length > 0;
|
|
213747
213747
|
}
|
|
213748
|
-
get(
|
|
213749
|
-
const idx = asItemIndex(
|
|
213748
|
+
get(key4, keepScalar) {
|
|
213749
|
+
const idx = asItemIndex(key4);
|
|
213750
213750
|
if (typeof idx !== "number")
|
|
213751
213751
|
return void 0;
|
|
213752
213752
|
const it = this.items[idx];
|
|
@@ -213758,8 +213758,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213758
213758
|
* `key` must contain a representation of an integer for this to succeed.
|
|
213759
213759
|
* It may be wrapped in a `Scalar`.
|
|
213760
213760
|
*/
|
|
213761
|
-
has(
|
|
213762
|
-
const idx = asItemIndex(
|
|
213761
|
+
has(key4) {
|
|
213762
|
+
const idx = asItemIndex(key4);
|
|
213763
213763
|
return typeof idx === "number" && idx < this.items.length;
|
|
213764
213764
|
}
|
|
213765
213765
|
/**
|
|
@@ -213769,10 +213769,10 @@ var require_YAMLSeq = __commonJS({
|
|
|
213769
213769
|
* If `key` does not contain a representation of an integer, this will throw.
|
|
213770
213770
|
* It may be wrapped in a `Scalar`.
|
|
213771
213771
|
*/
|
|
213772
|
-
set(
|
|
213773
|
-
const idx = asItemIndex(
|
|
213772
|
+
set(key4, value) {
|
|
213773
|
+
const idx = asItemIndex(key4);
|
|
213774
213774
|
if (typeof idx !== "number")
|
|
213775
|
-
throw new Error(`Expected a valid index, not ${
|
|
213775
|
+
throw new Error(`Expected a valid index, not ${key4}.`);
|
|
213776
213776
|
const prev = this.items[idx];
|
|
213777
213777
|
if (identity.isScalar(prev) && Scalar.isScalarValue(value))
|
|
213778
213778
|
prev.value = value;
|
|
@@ -213806,8 +213806,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213806
213806
|
let i = 0;
|
|
213807
213807
|
for (let it of obj) {
|
|
213808
213808
|
if (typeof replacer === "function") {
|
|
213809
|
-
const
|
|
213810
|
-
it = replacer.call(obj,
|
|
213809
|
+
const key4 = obj instanceof Set ? it : String(i++);
|
|
213810
|
+
it = replacer.call(obj, key4, it);
|
|
213811
213811
|
}
|
|
213812
213812
|
seq.items.push(createNode.createNode(it, void 0, ctx));
|
|
213813
213813
|
}
|
|
@@ -213815,8 +213815,8 @@ var require_YAMLSeq = __commonJS({
|
|
|
213815
213815
|
return seq;
|
|
213816
213816
|
}
|
|
213817
213817
|
};
|
|
213818
|
-
function asItemIndex(
|
|
213819
|
-
let idx = identity.isScalar(
|
|
213818
|
+
function asItemIndex(key4) {
|
|
213819
|
+
let idx = identity.isScalar(key4) ? key4.value : key4;
|
|
213820
213820
|
if (idx && typeof idx === "string")
|
|
213821
213821
|
idx = Number(idx);
|
|
213822
213822
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -214230,25 +214230,25 @@ ${cn.comment}` : item.comment;
|
|
|
214230
214230
|
for (let it of iterable) {
|
|
214231
214231
|
if (typeof replacer === "function")
|
|
214232
214232
|
it = replacer.call(iterable, String(i++), it);
|
|
214233
|
-
let
|
|
214233
|
+
let key4, value;
|
|
214234
214234
|
if (Array.isArray(it)) {
|
|
214235
214235
|
if (it.length === 2) {
|
|
214236
|
-
|
|
214236
|
+
key4 = it[0];
|
|
214237
214237
|
value = it[1];
|
|
214238
214238
|
} else
|
|
214239
214239
|
throw new TypeError(`Expected [key, value] tuple: ${it}`);
|
|
214240
214240
|
} else if (it && it instanceof Object) {
|
|
214241
214241
|
const keys = Object.keys(it);
|
|
214242
214242
|
if (keys.length === 1) {
|
|
214243
|
-
|
|
214244
|
-
value = it[
|
|
214243
|
+
key4 = keys[0];
|
|
214244
|
+
value = it[key4];
|
|
214245
214245
|
} else {
|
|
214246
214246
|
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
214247
214247
|
}
|
|
214248
214248
|
} else {
|
|
214249
|
-
|
|
214249
|
+
key4 = it;
|
|
214250
214250
|
}
|
|
214251
|
-
pairs2.items.push(Pair.createPair(
|
|
214251
|
+
pairs2.items.push(Pair.createPair(key4, value, ctx));
|
|
214252
214252
|
}
|
|
214253
214253
|
return pairs2;
|
|
214254
214254
|
}
|
|
@@ -214295,16 +214295,16 @@ var require_omap = __commonJS({
|
|
|
214295
214295
|
if (ctx?.onCreate)
|
|
214296
214296
|
ctx.onCreate(map2);
|
|
214297
214297
|
for (const pair of this.items) {
|
|
214298
|
-
let
|
|
214298
|
+
let key4, value;
|
|
214299
214299
|
if (identity.isPair(pair)) {
|
|
214300
|
-
|
|
214301
|
-
value = toJS.toJS(pair.value,
|
|
214300
|
+
key4 = toJS.toJS(pair.key, "", ctx);
|
|
214301
|
+
value = toJS.toJS(pair.value, key4, ctx);
|
|
214302
214302
|
} else {
|
|
214303
|
-
|
|
214303
|
+
key4 = toJS.toJS(pair, "", ctx);
|
|
214304
214304
|
}
|
|
214305
|
-
if (map2.has(
|
|
214305
|
+
if (map2.has(key4))
|
|
214306
214306
|
throw new Error("Ordered maps must not include duplicate keys");
|
|
214307
|
-
map2.set(
|
|
214307
|
+
map2.set(key4, value);
|
|
214308
214308
|
}
|
|
214309
214309
|
return map2;
|
|
214310
214310
|
}
|
|
@@ -214325,12 +214325,12 @@ var require_omap = __commonJS({
|
|
|
214325
214325
|
resolve(seq, onError) {
|
|
214326
214326
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
214327
214327
|
const seenKeys = [];
|
|
214328
|
-
for (const { key:
|
|
214329
|
-
if (identity.isScalar(
|
|
214330
|
-
if (seenKeys.includes(
|
|
214331
|
-
onError(`Ordered maps must not include duplicate keys: ${
|
|
214328
|
+
for (const { key: key4 } of pairs$1.items) {
|
|
214329
|
+
if (identity.isScalar(key4)) {
|
|
214330
|
+
if (seenKeys.includes(key4.value)) {
|
|
214331
|
+
onError(`Ordered maps must not include duplicate keys: ${key4.value}`);
|
|
214332
214332
|
} else {
|
|
214333
|
-
seenKeys.push(
|
|
214333
|
+
seenKeys.push(key4.value);
|
|
214334
214334
|
}
|
|
214335
214335
|
}
|
|
214336
214336
|
}
|
|
@@ -214515,14 +214515,14 @@ var require_set = __commonJS({
|
|
|
214515
214515
|
super(schema);
|
|
214516
214516
|
this.tag = _YAMLSet.tag;
|
|
214517
214517
|
}
|
|
214518
|
-
add(
|
|
214518
|
+
add(key4) {
|
|
214519
214519
|
let pair;
|
|
214520
|
-
if (identity.isPair(
|
|
214521
|
-
pair =
|
|
214522
|
-
else if (
|
|
214523
|
-
pair = new Pair.Pair(
|
|
214520
|
+
if (identity.isPair(key4))
|
|
214521
|
+
pair = key4;
|
|
214522
|
+
else if (key4 && typeof key4 === "object" && "key" in key4 && "value" in key4 && key4.value === null)
|
|
214523
|
+
pair = new Pair.Pair(key4.key, null);
|
|
214524
214524
|
else
|
|
214525
|
-
pair = new Pair.Pair(
|
|
214525
|
+
pair = new Pair.Pair(key4, null);
|
|
214526
214526
|
const prev = YAMLMap.findPair(this.items, pair.key);
|
|
214527
214527
|
if (!prev)
|
|
214528
214528
|
this.items.push(pair);
|
|
@@ -214531,18 +214531,18 @@ var require_set = __commonJS({
|
|
|
214531
214531
|
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
214532
214532
|
* Otherwise, returns the value of that Pair's key.
|
|
214533
214533
|
*/
|
|
214534
|
-
get(
|
|
214535
|
-
const pair = YAMLMap.findPair(this.items,
|
|
214534
|
+
get(key4, keepPair) {
|
|
214535
|
+
const pair = YAMLMap.findPair(this.items, key4);
|
|
214536
214536
|
return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
214537
214537
|
}
|
|
214538
|
-
set(
|
|
214538
|
+
set(key4, value) {
|
|
214539
214539
|
if (typeof value !== "boolean")
|
|
214540
214540
|
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
|
|
214541
|
-
const prev = YAMLMap.findPair(this.items,
|
|
214541
|
+
const prev = YAMLMap.findPair(this.items, key4);
|
|
214542
214542
|
if (prev && !value) {
|
|
214543
214543
|
this.items.splice(this.items.indexOf(prev), 1);
|
|
214544
214544
|
} else if (!prev && value) {
|
|
214545
|
-
this.items.push(new Pair.Pair(
|
|
214545
|
+
this.items.push(new Pair.Pair(key4));
|
|
214546
214546
|
}
|
|
214547
214547
|
}
|
|
214548
214548
|
toJSON(_, ctx) {
|
|
@@ -214789,7 +214789,7 @@ var require_tags = __commonJS({
|
|
|
214789
214789
|
if (Array.isArray(customTags))
|
|
214790
214790
|
tags = [];
|
|
214791
214791
|
else {
|
|
214792
|
-
const keys = Array.from(schemas.keys()).filter((
|
|
214792
|
+
const keys = Array.from(schemas.keys()).filter((key4) => key4 !== "yaml11").map((key4) => JSON.stringify(key4)).join(", ");
|
|
214793
214793
|
throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
|
|
214794
214794
|
}
|
|
214795
214795
|
}
|
|
@@ -214805,7 +214805,7 @@ var require_tags = __commonJS({
|
|
|
214805
214805
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
214806
214806
|
if (!tagObj) {
|
|
214807
214807
|
const tagName = JSON.stringify(tag);
|
|
214808
|
-
const keys = Object.keys(tagsByName).map((
|
|
214808
|
+
const keys = Object.keys(tagsByName).map((key4) => JSON.stringify(key4)).join(", ");
|
|
214809
214809
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
214810
214810
|
}
|
|
214811
214811
|
if (!tags2.includes(tagObj))
|
|
@@ -215069,8 +215069,8 @@ var require_Document = __commonJS({
|
|
|
215069
215069
|
* Convert a key and a value into a `Pair` using the current schema,
|
|
215070
215070
|
* recursively wrapping all values as `Scalar` or `Collection` nodes.
|
|
215071
215071
|
*/
|
|
215072
|
-
createPair(
|
|
215073
|
-
const k = this.createNode(
|
|
215072
|
+
createPair(key4, value, options = {}) {
|
|
215073
|
+
const k = this.createNode(key4, null, options);
|
|
215074
215074
|
const v = this.createNode(value, null, options);
|
|
215075
215075
|
return new Pair.Pair(k, v);
|
|
215076
215076
|
}
|
|
@@ -215078,8 +215078,8 @@ var require_Document = __commonJS({
|
|
|
215078
215078
|
* Removes a value from the document.
|
|
215079
215079
|
* @returns `true` if the item was found and removed.
|
|
215080
215080
|
*/
|
|
215081
|
-
delete(
|
|
215082
|
-
return assertCollection(this.contents) ? this.contents.delete(
|
|
215081
|
+
delete(key4) {
|
|
215082
|
+
return assertCollection(this.contents) ? this.contents.delete(key4) : false;
|
|
215083
215083
|
}
|
|
215084
215084
|
/**
|
|
215085
215085
|
* Removes a value from the document.
|
|
@@ -215099,8 +215099,8 @@ var require_Document = __commonJS({
|
|
|
215099
215099
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
215100
215100
|
* `true` (collections are always returned intact).
|
|
215101
215101
|
*/
|
|
215102
|
-
get(
|
|
215103
|
-
return identity.isCollection(this.contents) ? this.contents.get(
|
|
215102
|
+
get(key4, keepScalar) {
|
|
215103
|
+
return identity.isCollection(this.contents) ? this.contents.get(key4, keepScalar) : void 0;
|
|
215104
215104
|
}
|
|
215105
215105
|
/**
|
|
215106
215106
|
* Returns item at `path`, or `undefined` if not found. By default unwraps
|
|
@@ -215115,8 +215115,8 @@ var require_Document = __commonJS({
|
|
|
215115
215115
|
/**
|
|
215116
215116
|
* Checks if the document includes a value with the key `key`.
|
|
215117
215117
|
*/
|
|
215118
|
-
has(
|
|
215119
|
-
return identity.isCollection(this.contents) ? this.contents.has(
|
|
215118
|
+
has(key4) {
|
|
215119
|
+
return identity.isCollection(this.contents) ? this.contents.has(key4) : false;
|
|
215120
215120
|
}
|
|
215121
215121
|
/**
|
|
215122
215122
|
* Checks if the document includes a value at `path`.
|
|
@@ -215130,11 +215130,11 @@ var require_Document = __commonJS({
|
|
|
215130
215130
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
215131
215131
|
* boolean to add/remove the item from the set.
|
|
215132
215132
|
*/
|
|
215133
|
-
set(
|
|
215133
|
+
set(key4, value) {
|
|
215134
215134
|
if (this.contents == null) {
|
|
215135
|
-
this.contents = Collection.collectionFromPath(this.schema, [
|
|
215135
|
+
this.contents = Collection.collectionFromPath(this.schema, [key4], value);
|
|
215136
215136
|
} else if (assertCollection(this.contents)) {
|
|
215137
|
-
this.contents.set(
|
|
215137
|
+
this.contents.set(key4, value);
|
|
215138
215138
|
}
|
|
215139
215139
|
}
|
|
215140
215140
|
/**
|
|
@@ -215442,24 +215442,24 @@ var require_resolve_props = __commonJS({
|
|
|
215442
215442
|
var require_util_contains_newline = __commonJS({
|
|
215443
215443
|
"node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
215444
215444
|
"use strict";
|
|
215445
|
-
function containsNewline(
|
|
215446
|
-
if (!
|
|
215445
|
+
function containsNewline(key4) {
|
|
215446
|
+
if (!key4)
|
|
215447
215447
|
return null;
|
|
215448
|
-
switch (
|
|
215448
|
+
switch (key4.type) {
|
|
215449
215449
|
case "alias":
|
|
215450
215450
|
case "scalar":
|
|
215451
215451
|
case "double-quoted-scalar":
|
|
215452
215452
|
case "single-quoted-scalar":
|
|
215453
|
-
if (
|
|
215453
|
+
if (key4.source.includes("\n"))
|
|
215454
215454
|
return true;
|
|
215455
|
-
if (
|
|
215456
|
-
for (const st of
|
|
215455
|
+
if (key4.end) {
|
|
215456
|
+
for (const st of key4.end)
|
|
215457
215457
|
if (st.type === "newline")
|
|
215458
215458
|
return true;
|
|
215459
215459
|
}
|
|
215460
215460
|
return false;
|
|
215461
215461
|
case "flow-collection":
|
|
215462
|
-
for (const it of
|
|
215462
|
+
for (const it of key4.items) {
|
|
215463
215463
|
for (const st of it.start)
|
|
215464
215464
|
if (st.type === "newline")
|
|
215465
215465
|
return true;
|
|
@@ -215533,10 +215533,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
215533
215533
|
let offset = bm.offset;
|
|
215534
215534
|
let commentEnd = null;
|
|
215535
215535
|
for (const collItem of bm.items) {
|
|
215536
|
-
const { start, key:
|
|
215536
|
+
const { start, key: key4, sep: sep3, value } = collItem;
|
|
215537
215537
|
const keyProps = resolveProps.resolveProps(start, {
|
|
215538
215538
|
indicator: "explicit-key-ind",
|
|
215539
|
-
next:
|
|
215539
|
+
next: key4 ?? sep3?.[0],
|
|
215540
215540
|
offset,
|
|
215541
215541
|
onError,
|
|
215542
215542
|
parentIndent: bm.indent,
|
|
@@ -215544,10 +215544,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
215544
215544
|
});
|
|
215545
215545
|
const implicitKey = !keyProps.found;
|
|
215546
215546
|
if (implicitKey) {
|
|
215547
|
-
if (
|
|
215548
|
-
if (
|
|
215547
|
+
if (key4) {
|
|
215548
|
+
if (key4.type === "block-seq")
|
|
215549
215549
|
onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
|
|
215550
|
-
else if ("indent" in
|
|
215550
|
+
else if ("indent" in key4 && key4.indent !== bm.indent)
|
|
215551
215551
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
215552
215552
|
}
|
|
215553
215553
|
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
@@ -215560,17 +215560,17 @@ var require_resolve_block_map = __commonJS({
|
|
|
215560
215560
|
}
|
|
215561
215561
|
continue;
|
|
215562
215562
|
}
|
|
215563
|
-
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(
|
|
215564
|
-
onError(
|
|
215563
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key4)) {
|
|
215564
|
+
onError(key4 ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
215565
215565
|
}
|
|
215566
215566
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
215567
215567
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
215568
215568
|
}
|
|
215569
215569
|
ctx.atKey = true;
|
|
215570
215570
|
const keyStart = keyProps.end;
|
|
215571
|
-
const keyNode =
|
|
215571
|
+
const keyNode = key4 ? composeNode(ctx, key4, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
|
|
215572
215572
|
if (ctx.schema.compat)
|
|
215573
|
-
utilFlowIndentCheck.flowIndentCheck(bm.indent,
|
|
215573
|
+
utilFlowIndentCheck.flowIndentCheck(bm.indent, key4, onError);
|
|
215574
215574
|
ctx.atKey = false;
|
|
215575
215575
|
if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode))
|
|
215576
215576
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
@@ -215580,7 +215580,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
215580
215580
|
offset: keyNode.range[2],
|
|
215581
215581
|
onError,
|
|
215582
215582
|
parentIndent: bm.indent,
|
|
215583
|
-
startOnNewline: !
|
|
215583
|
+
startOnNewline: !key4 || key4.type === "block-scalar"
|
|
215584
215584
|
});
|
|
215585
215585
|
offset = valueProps.end;
|
|
215586
215586
|
if (valueProps.found) {
|
|
@@ -215744,11 +215744,11 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215744
215744
|
let offset = fc.offset + fc.start.source.length;
|
|
215745
215745
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
215746
215746
|
const collItem = fc.items[i];
|
|
215747
|
-
const { start, key:
|
|
215747
|
+
const { start, key: key4, sep: sep3, value } = collItem;
|
|
215748
215748
|
const props = resolveProps.resolveProps(start, {
|
|
215749
215749
|
flow: fcName,
|
|
215750
215750
|
indicator: "explicit-key-ind",
|
|
215751
|
-
next:
|
|
215751
|
+
next: key4 ?? sep3?.[0],
|
|
215752
215752
|
offset,
|
|
215753
215753
|
onError,
|
|
215754
215754
|
parentIndent: fc.indent,
|
|
@@ -215769,9 +215769,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215769
215769
|
offset = props.end;
|
|
215770
215770
|
continue;
|
|
215771
215771
|
}
|
|
215772
|
-
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(
|
|
215772
|
+
if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key4))
|
|
215773
215773
|
onError(
|
|
215774
|
-
|
|
215774
|
+
key4,
|
|
215775
215775
|
// checked by containsNewline()
|
|
215776
215776
|
"MULTILINE_IMPLICIT_KEY",
|
|
215777
215777
|
"Implicit keys of flow sequence pairs need to be on a single line"
|
|
@@ -215818,8 +215818,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
215818
215818
|
} else {
|
|
215819
215819
|
ctx.atKey = true;
|
|
215820
215820
|
const keyStart = props.end;
|
|
215821
|
-
const keyNode =
|
|
215822
|
-
if (isBlock(
|
|
215821
|
+
const keyNode = key4 ? composeNode(ctx, key4, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
|
|
215822
|
+
if (isBlock(key4))
|
|
215823
215823
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
215824
215824
|
ctx.atKey = false;
|
|
215825
215825
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
@@ -216968,9 +216968,9 @@ var require_cst_scalar = __commonJS({
|
|
|
216968
216968
|
];
|
|
216969
216969
|
if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0))
|
|
216970
216970
|
props.push({ type: "newline", offset: -1, indent, source: "\n" });
|
|
216971
|
-
for (const
|
|
216972
|
-
if (
|
|
216973
|
-
delete token[
|
|
216971
|
+
for (const key4 of Object.keys(token))
|
|
216972
|
+
if (key4 !== "type" && key4 !== "offset")
|
|
216973
|
+
delete token[key4];
|
|
216974
216974
|
Object.assign(token, { type: "block-scalar", indent, props, source: body });
|
|
216975
216975
|
}
|
|
216976
216976
|
}
|
|
@@ -217018,9 +217018,9 @@ var require_cst_scalar = __commonJS({
|
|
|
217018
217018
|
default: {
|
|
217019
217019
|
const indent = "indent" in token ? token.indent : -1;
|
|
217020
217020
|
const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === "space" || st.type === "comment" || st.type === "newline") : [];
|
|
217021
|
-
for (const
|
|
217022
|
-
if (
|
|
217023
|
-
delete token[
|
|
217021
|
+
for (const key4 of Object.keys(token))
|
|
217022
|
+
if (key4 !== "type" && key4 !== "offset")
|
|
217023
|
+
delete token[key4];
|
|
217024
217024
|
Object.assign(token, { type, indent, source, end });
|
|
217025
217025
|
}
|
|
217026
217026
|
}
|
|
@@ -217075,12 +217075,12 @@ var require_cst_stringify = __commonJS({
|
|
|
217075
217075
|
}
|
|
217076
217076
|
}
|
|
217077
217077
|
}
|
|
217078
|
-
function stringifyItem({ start, key:
|
|
217078
|
+
function stringifyItem({ start, key: key4, sep: sep3, value }) {
|
|
217079
217079
|
let res = "";
|
|
217080
217080
|
for (const st of start)
|
|
217081
217081
|
res += st.source;
|
|
217082
|
-
if (
|
|
217083
|
-
res += stringifyToken(
|
|
217082
|
+
if (key4)
|
|
217083
|
+
res += stringifyToken(key4);
|
|
217084
217084
|
if (sep3)
|
|
217085
217085
|
for (const st of sep3)
|
|
217086
217086
|
res += st.source;
|
|
@@ -218412,7 +218412,7 @@ var require_parser = __commonJS({
|
|
|
218412
218412
|
});
|
|
218413
218413
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
218414
218414
|
const start2 = getFirstKeyStartProps(it.start);
|
|
218415
|
-
const
|
|
218415
|
+
const key4 = it.key;
|
|
218416
218416
|
const sep3 = it.sep;
|
|
218417
218417
|
sep3.push(this.sourceToken);
|
|
218418
218418
|
delete it.key;
|
|
@@ -218421,7 +218421,7 @@ var require_parser = __commonJS({
|
|
|
218421
218421
|
type: "block-map",
|
|
218422
218422
|
offset: this.offset,
|
|
218423
218423
|
indent: this.indent,
|
|
218424
|
-
items: [{ start: start2, key:
|
|
218424
|
+
items: [{ start: start2, key: key4, sep: sep3 }]
|
|
218425
218425
|
});
|
|
218426
218426
|
} else if (start.length > 0) {
|
|
218427
218427
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -218902,6 +218902,10 @@ var require_dist = __commonJS({
|
|
|
218902
218902
|
// src/saasfunnels.ts
|
|
218903
218903
|
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
218904
218904
|
|
|
218905
|
+
// src/cli.ts
|
|
218906
|
+
import { execFile as execFile5 } from "node:child_process";
|
|
218907
|
+
import { promisify as promisify5 } from "node:util";
|
|
218908
|
+
|
|
218905
218909
|
// src/setup-access.ts
|
|
218906
218910
|
import { execFile } from "node:child_process";
|
|
218907
218911
|
import { readFile } from "node:fs/promises";
|
|
@@ -218917,12 +218921,12 @@ async function resolveSetupAccess(options) {
|
|
|
218917
218921
|
)).trim();
|
|
218918
218922
|
if (choice === "1") {
|
|
218919
218923
|
try {
|
|
218920
|
-
const
|
|
218924
|
+
const key4 = options.loadDoppler ? await options.loadDoppler() : (await exec("doppler", ["secrets", "get", "SAASFUNNELS_API_KEY", "--plain"], {
|
|
218921
218925
|
cwd: options.cwd,
|
|
218922
218926
|
timeout: 3e4,
|
|
218923
218927
|
maxBuffer: 64e3
|
|
218924
218928
|
})).stdout;
|
|
218925
|
-
if (
|
|
218929
|
+
if (key4.trim()) return { key: key4.trim() };
|
|
218926
218930
|
} catch {
|
|
218927
218931
|
}
|
|
218928
218932
|
return { error: "Couldn\u2019t load developer access from Doppler. Check this folder\u2019s Doppler project/config and save SAASFUNNELS_API_KEY there, then rerun this command." };
|
|
@@ -218933,8 +218937,8 @@ async function resolveSetupAccess(options) {
|
|
|
218933
218937
|
try {
|
|
218934
218938
|
const source = await readFile(resolve(options.cwd, file2), "utf8");
|
|
218935
218939
|
if (source.length > 64e3) throw new Error("Oversized env file");
|
|
218936
|
-
const
|
|
218937
|
-
if (
|
|
218940
|
+
const key4 = parseEnv(source).SAASFUNNELS_API_KEY?.trim();
|
|
218941
|
+
if (key4) return { key: key4 };
|
|
218938
218942
|
} catch {
|
|
218939
218943
|
}
|
|
218940
218944
|
return { error: "Couldn\u2019t find SAASFUNNELS_API_KEY in the selected env file. Save the developer access key there, then rerun this command. No file was changed." };
|
|
@@ -219667,9 +219671,9 @@ function floatSafeRemainder(val, step) {
|
|
|
219667
219671
|
return ratio - roundedRatio;
|
|
219668
219672
|
}
|
|
219669
219673
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
219670
|
-
function defineLazy(object3,
|
|
219674
|
+
function defineLazy(object3, key4, getter) {
|
|
219671
219675
|
let value = void 0;
|
|
219672
|
-
Object.defineProperty(object3,
|
|
219676
|
+
Object.defineProperty(object3, key4, {
|
|
219673
219677
|
get() {
|
|
219674
219678
|
if (value === EVALUATING) {
|
|
219675
219679
|
return void 0;
|
|
@@ -219681,7 +219685,7 @@ function defineLazy(object3, key3, getter) {
|
|
|
219681
219685
|
return value;
|
|
219682
219686
|
},
|
|
219683
219687
|
set(v) {
|
|
219684
|
-
Object.defineProperty(object3,
|
|
219688
|
+
Object.defineProperty(object3, key4, {
|
|
219685
219689
|
value: v
|
|
219686
219690
|
// configurable: true,
|
|
219687
219691
|
});
|
|
@@ -219714,11 +219718,11 @@ function cloneDef(schema) {
|
|
|
219714
219718
|
function getElementAtPath(obj, path2) {
|
|
219715
219719
|
if (!path2)
|
|
219716
219720
|
return obj;
|
|
219717
|
-
return path2.reduce((acc,
|
|
219721
|
+
return path2.reduce((acc, key4) => acc?.[key4], obj);
|
|
219718
219722
|
}
|
|
219719
219723
|
function promiseAllObject(promisesObj) {
|
|
219720
219724
|
const keys = Object.keys(promisesObj);
|
|
219721
|
-
const promises = keys.map((
|
|
219725
|
+
const promises = keys.map((key4) => promisesObj[key4]);
|
|
219722
219726
|
return Promise.all(promises).then((results) => {
|
|
219723
219727
|
const resolvedObj = {};
|
|
219724
219728
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -219790,8 +219794,8 @@ function shallowClone(o) {
|
|
|
219790
219794
|
}
|
|
219791
219795
|
function numKeys(data) {
|
|
219792
219796
|
let keyCount = 0;
|
|
219793
|
-
for (const
|
|
219794
|
-
if (Object.prototype.hasOwnProperty.call(data,
|
|
219797
|
+
for (const key4 in data) {
|
|
219798
|
+
if (Object.prototype.hasOwnProperty.call(data, key4)) {
|
|
219795
219799
|
keyCount++;
|
|
219796
219800
|
}
|
|
219797
219801
|
}
|
|
@@ -219941,13 +219945,13 @@ function pick(schema, mask) {
|
|
|
219941
219945
|
const def = mergeDefs(schema._zod.def, {
|
|
219942
219946
|
get shape() {
|
|
219943
219947
|
const newShape = {};
|
|
219944
|
-
for (const
|
|
219945
|
-
if (!(
|
|
219946
|
-
throw new Error(`Unrecognized key: "${
|
|
219948
|
+
for (const key4 in mask) {
|
|
219949
|
+
if (!(key4 in currDef.shape)) {
|
|
219950
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
|
219947
219951
|
}
|
|
219948
|
-
if (!mask[
|
|
219952
|
+
if (!mask[key4])
|
|
219949
219953
|
continue;
|
|
219950
|
-
newShape[
|
|
219954
|
+
newShape[key4] = currDef.shape[key4];
|
|
219951
219955
|
}
|
|
219952
219956
|
assignProp(this, "shape", newShape);
|
|
219953
219957
|
return newShape;
|
|
@@ -219966,13 +219970,13 @@ function omit(schema, mask) {
|
|
|
219966
219970
|
const def = mergeDefs(schema._zod.def, {
|
|
219967
219971
|
get shape() {
|
|
219968
219972
|
const newShape = { ...schema._zod.def.shape };
|
|
219969
|
-
for (const
|
|
219970
|
-
if (!(
|
|
219971
|
-
throw new Error(`Unrecognized key: "${
|
|
219973
|
+
for (const key4 in mask) {
|
|
219974
|
+
if (!(key4 in currDef.shape)) {
|
|
219975
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
|
219972
219976
|
}
|
|
219973
|
-
if (!mask[
|
|
219977
|
+
if (!mask[key4])
|
|
219974
219978
|
continue;
|
|
219975
|
-
delete newShape[
|
|
219979
|
+
delete newShape[key4];
|
|
219976
219980
|
}
|
|
219977
219981
|
assignProp(this, "shape", newShape);
|
|
219978
219982
|
return newShape;
|
|
@@ -219989,8 +219993,8 @@ function extend(schema, shape) {
|
|
|
219989
219993
|
const hasChecks = checks && checks.length > 0;
|
|
219990
219994
|
if (hasChecks) {
|
|
219991
219995
|
const existingShape = schema._zod.def.shape;
|
|
219992
|
-
for (const
|
|
219993
|
-
if (Object.getOwnPropertyDescriptor(existingShape,
|
|
219996
|
+
for (const key4 in shape) {
|
|
219997
|
+
if (Object.getOwnPropertyDescriptor(existingShape, key4) !== void 0) {
|
|
219994
219998
|
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
219995
219999
|
}
|
|
219996
220000
|
}
|
|
@@ -220046,23 +220050,23 @@ function partial(Class2, schema, mask) {
|
|
|
220046
220050
|
const oldShape = schema._zod.def.shape;
|
|
220047
220051
|
const shape = { ...oldShape };
|
|
220048
220052
|
if (mask) {
|
|
220049
|
-
for (const
|
|
220050
|
-
if (!(
|
|
220051
|
-
throw new Error(`Unrecognized key: "${
|
|
220053
|
+
for (const key4 in mask) {
|
|
220054
|
+
if (!(key4 in oldShape)) {
|
|
220055
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
|
220052
220056
|
}
|
|
220053
|
-
if (!mask[
|
|
220057
|
+
if (!mask[key4])
|
|
220054
220058
|
continue;
|
|
220055
|
-
shape[
|
|
220059
|
+
shape[key4] = Class2 ? new Class2({
|
|
220056
220060
|
type: "optional",
|
|
220057
|
-
innerType: oldShape[
|
|
220058
|
-
}) : oldShape[
|
|
220061
|
+
innerType: oldShape[key4]
|
|
220062
|
+
}) : oldShape[key4];
|
|
220059
220063
|
}
|
|
220060
220064
|
} else {
|
|
220061
|
-
for (const
|
|
220062
|
-
shape[
|
|
220065
|
+
for (const key4 in oldShape) {
|
|
220066
|
+
shape[key4] = Class2 ? new Class2({
|
|
220063
220067
|
type: "optional",
|
|
220064
|
-
innerType: oldShape[
|
|
220065
|
-
}) : oldShape[
|
|
220068
|
+
innerType: oldShape[key4]
|
|
220069
|
+
}) : oldShape[key4];
|
|
220066
220070
|
}
|
|
220067
220071
|
}
|
|
220068
220072
|
assignProp(this, "shape", shape);
|
|
@@ -220078,22 +220082,22 @@ function required(Class2, schema, mask) {
|
|
|
220078
220082
|
const oldShape = schema._zod.def.shape;
|
|
220079
220083
|
const shape = { ...oldShape };
|
|
220080
220084
|
if (mask) {
|
|
220081
|
-
for (const
|
|
220082
|
-
if (!(
|
|
220083
|
-
throw new Error(`Unrecognized key: "${
|
|
220085
|
+
for (const key4 in mask) {
|
|
220086
|
+
if (!(key4 in shape)) {
|
|
220087
|
+
throw new Error(`Unrecognized key: "${key4}"`);
|
|
220084
220088
|
}
|
|
220085
|
-
if (!mask[
|
|
220089
|
+
if (!mask[key4])
|
|
220086
220090
|
continue;
|
|
220087
|
-
shape[
|
|
220091
|
+
shape[key4] = new Class2({
|
|
220088
220092
|
type: "nonoptional",
|
|
220089
|
-
innerType: oldShape[
|
|
220093
|
+
innerType: oldShape[key4]
|
|
220090
220094
|
});
|
|
220091
220095
|
}
|
|
220092
220096
|
} else {
|
|
220093
|
-
for (const
|
|
220094
|
-
shape[
|
|
220097
|
+
for (const key4 in oldShape) {
|
|
220098
|
+
shape[key4] = new Class2({
|
|
220095
220099
|
type: "nonoptional",
|
|
220096
|
-
innerType: oldShape[
|
|
220100
|
+
innerType: oldShape[key4]
|
|
220097
220101
|
});
|
|
220098
220102
|
}
|
|
220099
220103
|
}
|
|
@@ -221874,13 +221878,13 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
221874
221878
|
return payload;
|
|
221875
221879
|
};
|
|
221876
221880
|
});
|
|
221877
|
-
function handlePropertyResult(result3, final,
|
|
221878
|
-
const isPresent =
|
|
221881
|
+
function handlePropertyResult(result3, final, key4, input, isOptionalIn, isOptionalOut) {
|
|
221882
|
+
const isPresent = key4 in input;
|
|
221879
221883
|
if (result3.issues.length) {
|
|
221880
221884
|
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
221881
221885
|
return;
|
|
221882
221886
|
}
|
|
221883
|
-
final.issues.push(...prefixIssues(
|
|
221887
|
+
final.issues.push(...prefixIssues(key4, result3.issues));
|
|
221884
221888
|
}
|
|
221885
221889
|
if (!isPresent && !isOptionalIn) {
|
|
221886
221890
|
if (!result3.issues.length) {
|
|
@@ -221888,17 +221892,17 @@ function handlePropertyResult(result3, final, key3, input, isOptionalIn, isOptio
|
|
|
221888
221892
|
code: "invalid_type",
|
|
221889
221893
|
expected: "nonoptional",
|
|
221890
221894
|
input: void 0,
|
|
221891
|
-
path: [
|
|
221895
|
+
path: [key4]
|
|
221892
221896
|
});
|
|
221893
221897
|
}
|
|
221894
221898
|
return;
|
|
221895
221899
|
}
|
|
221896
221900
|
if (result3.value === void 0) {
|
|
221897
221901
|
if (isPresent) {
|
|
221898
|
-
final.value[
|
|
221902
|
+
final.value[key4] = void 0;
|
|
221899
221903
|
}
|
|
221900
221904
|
} else {
|
|
221901
|
-
final.value[
|
|
221905
|
+
final.value[key4] = result3.value;
|
|
221902
221906
|
}
|
|
221903
221907
|
}
|
|
221904
221908
|
function normalizeDef(def) {
|
|
@@ -221924,20 +221928,20 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
221924
221928
|
const t = _catchall.def.type;
|
|
221925
221929
|
const isOptionalIn = _catchall.optin === "optional";
|
|
221926
221930
|
const isOptionalOut = _catchall.optout === "optional";
|
|
221927
|
-
for (const
|
|
221928
|
-
if (
|
|
221931
|
+
for (const key4 in input) {
|
|
221932
|
+
if (key4 === "__proto__")
|
|
221929
221933
|
continue;
|
|
221930
|
-
if (keySet.has(
|
|
221934
|
+
if (keySet.has(key4))
|
|
221931
221935
|
continue;
|
|
221932
221936
|
if (t === "never") {
|
|
221933
|
-
unrecognized.push(
|
|
221937
|
+
unrecognized.push(key4);
|
|
221934
221938
|
continue;
|
|
221935
221939
|
}
|
|
221936
|
-
const r = _catchall.run({ value: input[
|
|
221940
|
+
const r = _catchall.run({ value: input[key4], issues: [] }, ctx);
|
|
221937
221941
|
if (r instanceof Promise) {
|
|
221938
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload,
|
|
221942
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key4, input, isOptionalIn, isOptionalOut)));
|
|
221939
221943
|
} else {
|
|
221940
|
-
handlePropertyResult(r, payload,
|
|
221944
|
+
handlePropertyResult(r, payload, key4, input, isOptionalIn, isOptionalOut);
|
|
221941
221945
|
}
|
|
221942
221946
|
}
|
|
221943
221947
|
if (unrecognized.length) {
|
|
@@ -221973,12 +221977,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
221973
221977
|
defineLazy(inst._zod, "propValues", () => {
|
|
221974
221978
|
const shape = def.shape;
|
|
221975
221979
|
const propValues = {};
|
|
221976
|
-
for (const
|
|
221977
|
-
const field = shape[
|
|
221980
|
+
for (const key4 in shape) {
|
|
221981
|
+
const field = shape[key4]._zod;
|
|
221978
221982
|
if (field.values) {
|
|
221979
|
-
propValues[
|
|
221983
|
+
propValues[key4] ?? (propValues[key4] = /* @__PURE__ */ new Set());
|
|
221980
221984
|
for (const v of field.values)
|
|
221981
|
-
propValues[
|
|
221985
|
+
propValues[key4].add(v);
|
|
221982
221986
|
}
|
|
221983
221987
|
}
|
|
221984
221988
|
return propValues;
|
|
@@ -222001,15 +222005,15 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
222001
222005
|
payload.value = {};
|
|
222002
222006
|
const proms = [];
|
|
222003
222007
|
const shape = value.shape;
|
|
222004
|
-
for (const
|
|
222005
|
-
const el = shape[
|
|
222008
|
+
for (const key4 of value.keys) {
|
|
222009
|
+
const el = shape[key4];
|
|
222006
222010
|
const isOptionalIn = el._zod.optin === "optional";
|
|
222007
222011
|
const isOptionalOut = el._zod.optout === "optional";
|
|
222008
|
-
const r = el._zod.run({ value: input[
|
|
222012
|
+
const r = el._zod.run({ value: input[key4], issues: [] }, ctx);
|
|
222009
222013
|
if (r instanceof Promise) {
|
|
222010
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload,
|
|
222014
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key4, input, isOptionalIn, isOptionalOut)));
|
|
222011
222015
|
} else {
|
|
222012
|
-
handlePropertyResult(r, payload,
|
|
222016
|
+
handlePropertyResult(r, payload, key4, input, isOptionalIn, isOptionalOut);
|
|
222013
222017
|
}
|
|
222014
222018
|
}
|
|
222015
222019
|
if (!catchall) {
|
|
@@ -222025,24 +222029,24 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
222025
222029
|
const generateFastpass = (shape) => {
|
|
222026
222030
|
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
222027
222031
|
const normalized = _normalized.value;
|
|
222028
|
-
const parseStr = (
|
|
222029
|
-
const k = esc(
|
|
222032
|
+
const parseStr = (key4) => {
|
|
222033
|
+
const k = esc(key4);
|
|
222030
222034
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
222031
222035
|
};
|
|
222032
222036
|
doc.write(`const input = payload.value;`);
|
|
222033
222037
|
const ids = /* @__PURE__ */ Object.create(null);
|
|
222034
222038
|
let counter = 0;
|
|
222035
|
-
for (const
|
|
222036
|
-
ids[
|
|
222039
|
+
for (const key4 of normalized.keys) {
|
|
222040
|
+
ids[key4] = `key_${counter++}`;
|
|
222037
222041
|
}
|
|
222038
222042
|
doc.write(`const newResult = {};`);
|
|
222039
|
-
for (const
|
|
222040
|
-
const id = ids[
|
|
222041
|
-
const k = esc(
|
|
222042
|
-
const schema = shape[
|
|
222043
|
+
for (const key4 of normalized.keys) {
|
|
222044
|
+
const id = ids[key4];
|
|
222045
|
+
const k = esc(key4);
|
|
222046
|
+
const schema = shape[key4];
|
|
222043
222047
|
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
222044
222048
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
222045
|
-
doc.write(`const ${id} = ${parseStr(
|
|
222049
|
+
doc.write(`const ${id} = ${parseStr(key4)};`);
|
|
222046
222050
|
if (isOptionalIn && isOptionalOut) {
|
|
222047
222051
|
doc.write(`
|
|
222048
222052
|
if (${id}.issues.length) {
|
|
@@ -222354,17 +222358,17 @@ function mergeValues(a, b) {
|
|
|
222354
222358
|
}
|
|
222355
222359
|
if (isPlainObject(a) && isPlainObject(b)) {
|
|
222356
222360
|
const bKeys = Object.keys(b);
|
|
222357
|
-
const sharedKeys = Object.keys(a).filter((
|
|
222361
|
+
const sharedKeys = Object.keys(a).filter((key4) => bKeys.indexOf(key4) !== -1);
|
|
222358
222362
|
const newObj = { ...a, ...b };
|
|
222359
|
-
for (const
|
|
222360
|
-
const sharedValue = mergeValues(a[
|
|
222363
|
+
for (const key4 of sharedKeys) {
|
|
222364
|
+
const sharedValue = mergeValues(a[key4], b[key4]);
|
|
222361
222365
|
if (!sharedValue.valid) {
|
|
222362
222366
|
return {
|
|
222363
222367
|
valid: false,
|
|
222364
|
-
mergeErrorPath: [
|
|
222368
|
+
mergeErrorPath: [key4, ...sharedValue.mergeErrorPath]
|
|
222365
222369
|
};
|
|
222366
222370
|
}
|
|
222367
|
-
newObj[
|
|
222371
|
+
newObj[key4] = sharedValue.data;
|
|
222368
222372
|
}
|
|
222369
222373
|
return { valid: true, data: newObj };
|
|
222370
222374
|
}
|
|
@@ -222499,9 +222503,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
222499
222503
|
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
222500
222504
|
};
|
|
222501
222505
|
});
|
|
222502
|
-
function getTupleOptStart(items,
|
|
222506
|
+
function getTupleOptStart(items, key4) {
|
|
222503
222507
|
for (let i = items.length - 1; i >= 0; i--) {
|
|
222504
|
-
if (items[i]._zod[
|
|
222508
|
+
if (items[i]._zod[key4] !== "optional")
|
|
222505
222509
|
return i + 1;
|
|
222506
222510
|
}
|
|
222507
222511
|
return 0;
|
|
@@ -222552,10 +222556,10 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222552
222556
|
if (values) {
|
|
222553
222557
|
payload.value = {};
|
|
222554
222558
|
const recordKeys = /* @__PURE__ */ new Set();
|
|
222555
|
-
for (const
|
|
222556
|
-
if (typeof
|
|
222557
|
-
recordKeys.add(typeof
|
|
222558
|
-
const keyResult = def.keyType._zod.run({ value:
|
|
222559
|
+
for (const key4 of values) {
|
|
222560
|
+
if (typeof key4 === "string" || typeof key4 === "number" || typeof key4 === "symbol") {
|
|
222561
|
+
recordKeys.add(typeof key4 === "number" ? key4.toString() : key4);
|
|
222562
|
+
const keyResult = def.keyType._zod.run({ value: key4, issues: [] }, ctx);
|
|
222559
222563
|
if (keyResult instanceof Promise) {
|
|
222560
222564
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222561
222565
|
}
|
|
@@ -222564,34 +222568,34 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222564
222568
|
code: "invalid_key",
|
|
222565
222569
|
origin: "record",
|
|
222566
222570
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
222567
|
-
input:
|
|
222568
|
-
path: [
|
|
222571
|
+
input: key4,
|
|
222572
|
+
path: [key4],
|
|
222569
222573
|
inst
|
|
222570
222574
|
});
|
|
222571
222575
|
continue;
|
|
222572
222576
|
}
|
|
222573
222577
|
const outKey = keyResult.value;
|
|
222574
|
-
const result3 = def.valueType._zod.run({ value: input[
|
|
222578
|
+
const result3 = def.valueType._zod.run({ value: input[key4], issues: [] }, ctx);
|
|
222575
222579
|
if (result3 instanceof Promise) {
|
|
222576
222580
|
proms.push(result3.then((result4) => {
|
|
222577
222581
|
if (result4.issues.length) {
|
|
222578
|
-
payload.issues.push(...prefixIssues(
|
|
222582
|
+
payload.issues.push(...prefixIssues(key4, result4.issues));
|
|
222579
222583
|
}
|
|
222580
222584
|
payload.value[outKey] = result4.value;
|
|
222581
222585
|
}));
|
|
222582
222586
|
} else {
|
|
222583
222587
|
if (result3.issues.length) {
|
|
222584
|
-
payload.issues.push(...prefixIssues(
|
|
222588
|
+
payload.issues.push(...prefixIssues(key4, result3.issues));
|
|
222585
222589
|
}
|
|
222586
222590
|
payload.value[outKey] = result3.value;
|
|
222587
222591
|
}
|
|
222588
222592
|
}
|
|
222589
222593
|
}
|
|
222590
222594
|
let unrecognized;
|
|
222591
|
-
for (const
|
|
222592
|
-
if (!recordKeys.has(
|
|
222595
|
+
for (const key4 in input) {
|
|
222596
|
+
if (!recordKeys.has(key4)) {
|
|
222593
222597
|
unrecognized = unrecognized ?? [];
|
|
222594
|
-
unrecognized.push(
|
|
222598
|
+
unrecognized.push(key4);
|
|
222595
222599
|
}
|
|
222596
222600
|
}
|
|
222597
222601
|
if (unrecognized && unrecognized.length > 0) {
|
|
@@ -222604,18 +222608,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222604
222608
|
}
|
|
222605
222609
|
} else {
|
|
222606
222610
|
payload.value = {};
|
|
222607
|
-
for (const
|
|
222608
|
-
if (
|
|
222611
|
+
for (const key4 of Reflect.ownKeys(input)) {
|
|
222612
|
+
if (key4 === "__proto__")
|
|
222609
222613
|
continue;
|
|
222610
|
-
if (!Object.prototype.propertyIsEnumerable.call(input,
|
|
222614
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key4))
|
|
222611
222615
|
continue;
|
|
222612
|
-
let keyResult = def.keyType._zod.run({ value:
|
|
222616
|
+
let keyResult = def.keyType._zod.run({ value: key4, issues: [] }, ctx);
|
|
222613
222617
|
if (keyResult instanceof Promise) {
|
|
222614
222618
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222615
222619
|
}
|
|
222616
|
-
const checkNumericKey = typeof
|
|
222620
|
+
const checkNumericKey = typeof key4 === "string" && number.test(key4) && keyResult.issues.length;
|
|
222617
222621
|
if (checkNumericKey) {
|
|
222618
|
-
const retryResult = def.keyType._zod.run({ value: Number(
|
|
222622
|
+
const retryResult = def.keyType._zod.run({ value: Number(key4), issues: [] }, ctx);
|
|
222619
222623
|
if (retryResult instanceof Promise) {
|
|
222620
222624
|
throw new Error("Async schemas not supported in object keys currently");
|
|
222621
222625
|
}
|
|
@@ -222625,30 +222629,30 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
222625
222629
|
}
|
|
222626
222630
|
if (keyResult.issues.length) {
|
|
222627
222631
|
if (def.mode === "loose") {
|
|
222628
|
-
payload.value[
|
|
222632
|
+
payload.value[key4] = input[key4];
|
|
222629
222633
|
} else {
|
|
222630
222634
|
payload.issues.push({
|
|
222631
222635
|
code: "invalid_key",
|
|
222632
222636
|
origin: "record",
|
|
222633
222637
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
222634
|
-
input:
|
|
222635
|
-
path: [
|
|
222638
|
+
input: key4,
|
|
222639
|
+
path: [key4],
|
|
222636
222640
|
inst
|
|
222637
222641
|
});
|
|
222638
222642
|
}
|
|
222639
222643
|
continue;
|
|
222640
222644
|
}
|
|
222641
|
-
const result3 = def.valueType._zod.run({ value: input[
|
|
222645
|
+
const result3 = def.valueType._zod.run({ value: input[key4], issues: [] }, ctx);
|
|
222642
222646
|
if (result3 instanceof Promise) {
|
|
222643
222647
|
proms.push(result3.then((result4) => {
|
|
222644
222648
|
if (result4.issues.length) {
|
|
222645
|
-
payload.issues.push(...prefixIssues(
|
|
222649
|
+
payload.issues.push(...prefixIssues(key4, result4.issues));
|
|
222646
222650
|
}
|
|
222647
222651
|
payload.value[keyResult.value] = result4.value;
|
|
222648
222652
|
}));
|
|
222649
222653
|
} else {
|
|
222650
222654
|
if (result3.issues.length) {
|
|
222651
|
-
payload.issues.push(...prefixIssues(
|
|
222655
|
+
payload.issues.push(...prefixIssues(key4, result3.issues));
|
|
222652
222656
|
}
|
|
222653
222657
|
payload.value[keyResult.value] = result3.value;
|
|
222654
222658
|
}
|
|
@@ -222675,15 +222679,15 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
222675
222679
|
}
|
|
222676
222680
|
const proms = [];
|
|
222677
222681
|
payload.value = /* @__PURE__ */ new Map();
|
|
222678
|
-
for (const [
|
|
222679
|
-
const keyResult = def.keyType._zod.run({ value:
|
|
222682
|
+
for (const [key4, value] of input) {
|
|
222683
|
+
const keyResult = def.keyType._zod.run({ value: key4, issues: [] }, ctx);
|
|
222680
222684
|
const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
|
|
222681
222685
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
222682
222686
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
|
|
222683
|
-
handleMapResult(keyResult2, valueResult2, payload,
|
|
222687
|
+
handleMapResult(keyResult2, valueResult2, payload, key4, input, inst, ctx);
|
|
222684
222688
|
}));
|
|
222685
222689
|
} else {
|
|
222686
|
-
handleMapResult(keyResult, valueResult, payload,
|
|
222690
|
+
handleMapResult(keyResult, valueResult, payload, key4, input, inst, ctx);
|
|
222687
222691
|
}
|
|
222688
222692
|
}
|
|
222689
222693
|
if (proms.length)
|
|
@@ -222691,10 +222695,10 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
222691
222695
|
return payload;
|
|
222692
222696
|
};
|
|
222693
222697
|
});
|
|
222694
|
-
function handleMapResult(keyResult, valueResult, final,
|
|
222698
|
+
function handleMapResult(keyResult, valueResult, final, key4, input, inst, ctx) {
|
|
222695
222699
|
if (keyResult.issues.length) {
|
|
222696
|
-
if (propertyKeyTypes.has(typeof
|
|
222697
|
-
final.issues.push(...prefixIssues(
|
|
222700
|
+
if (propertyKeyTypes.has(typeof key4)) {
|
|
222701
|
+
final.issues.push(...prefixIssues(key4, keyResult.issues));
|
|
222698
222702
|
} else {
|
|
222699
222703
|
final.issues.push({
|
|
222700
222704
|
code: "invalid_key",
|
|
@@ -222706,15 +222710,15 @@ function handleMapResult(keyResult, valueResult, final, key3, input, inst, ctx)
|
|
|
222706
222710
|
}
|
|
222707
222711
|
}
|
|
222708
222712
|
if (valueResult.issues.length) {
|
|
222709
|
-
if (propertyKeyTypes.has(typeof
|
|
222710
|
-
final.issues.push(...prefixIssues(
|
|
222713
|
+
if (propertyKeyTypes.has(typeof key4)) {
|
|
222714
|
+
final.issues.push(...prefixIssues(key4, valueResult.issues));
|
|
222711
222715
|
} else {
|
|
222712
222716
|
final.issues.push({
|
|
222713
222717
|
origin: "map",
|
|
222714
222718
|
code: "invalid_element",
|
|
222715
222719
|
input,
|
|
222716
222720
|
inst,
|
|
222717
|
-
key:
|
|
222721
|
+
key: key4,
|
|
222718
222722
|
issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
222719
222723
|
});
|
|
222720
222724
|
}
|
|
@@ -230475,8 +230479,8 @@ function extractDefs(ctx, schema) {
|
|
|
230475
230479
|
if (defId)
|
|
230476
230480
|
seen.defId = defId;
|
|
230477
230481
|
const schema2 = seen.schema;
|
|
230478
|
-
for (const
|
|
230479
|
-
delete schema2[
|
|
230482
|
+
for (const key4 in schema2) {
|
|
230483
|
+
delete schema2[key4];
|
|
230480
230484
|
}
|
|
230481
230485
|
schema2.$ref = ref;
|
|
230482
230486
|
};
|
|
@@ -230545,20 +230549,20 @@ function finalize(ctx, schema) {
|
|
|
230545
230549
|
Object.assign(schema2, _cached);
|
|
230546
230550
|
const isParentRef = zodSchema._zod.parent === ref;
|
|
230547
230551
|
if (isParentRef) {
|
|
230548
|
-
for (const
|
|
230549
|
-
if (
|
|
230552
|
+
for (const key4 in schema2) {
|
|
230553
|
+
if (key4 === "$ref" || key4 === "allOf")
|
|
230550
230554
|
continue;
|
|
230551
|
-
if (!(
|
|
230552
|
-
delete schema2[
|
|
230555
|
+
if (!(key4 in _cached)) {
|
|
230556
|
+
delete schema2[key4];
|
|
230553
230557
|
}
|
|
230554
230558
|
}
|
|
230555
230559
|
}
|
|
230556
230560
|
if (refSchema.$ref && refSeen.def) {
|
|
230557
|
-
for (const
|
|
230558
|
-
if (
|
|
230561
|
+
for (const key4 in schema2) {
|
|
230562
|
+
if (key4 === "$ref" || key4 === "allOf")
|
|
230559
230563
|
continue;
|
|
230560
|
-
if (
|
|
230561
|
-
delete schema2[
|
|
230564
|
+
if (key4 in refSeen.def && JSON.stringify(schema2[key4]) === JSON.stringify(refSeen.def[key4])) {
|
|
230565
|
+
delete schema2[key4];
|
|
230562
230566
|
}
|
|
230563
230567
|
}
|
|
230564
230568
|
}
|
|
@@ -230570,11 +230574,11 @@ function finalize(ctx, schema) {
|
|
|
230570
230574
|
if (parentSeen?.schema.$ref) {
|
|
230571
230575
|
schema2.$ref = parentSeen.schema.$ref;
|
|
230572
230576
|
if (parentSeen.def) {
|
|
230573
|
-
for (const
|
|
230574
|
-
if (
|
|
230577
|
+
for (const key4 in schema2) {
|
|
230578
|
+
if (key4 === "$ref" || key4 === "allOf")
|
|
230575
230579
|
continue;
|
|
230576
|
-
if (
|
|
230577
|
-
delete schema2[
|
|
230580
|
+
if (key4 in parentSeen.def && JSON.stringify(schema2[key4]) === JSON.stringify(parentSeen.def[key4])) {
|
|
230581
|
+
delete schema2[key4];
|
|
230578
230582
|
}
|
|
230579
230583
|
}
|
|
230580
230584
|
}
|
|
@@ -230675,8 +230679,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
230675
230679
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
230676
230680
|
}
|
|
230677
230681
|
if (def.type === "object") {
|
|
230678
|
-
for (const
|
|
230679
|
-
if (isTransforming(def.shape[
|
|
230682
|
+
for (const key4 in def.shape) {
|
|
230683
|
+
if (isTransforming(def.shape[key4], ctx))
|
|
230680
230684
|
return true;
|
|
230681
230685
|
}
|
|
230682
230686
|
return false;
|
|
@@ -230965,15 +230969,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
230965
230969
|
json2.type = "object";
|
|
230966
230970
|
json2.properties = {};
|
|
230967
230971
|
const shape = def.shape;
|
|
230968
|
-
for (const
|
|
230969
|
-
json2.properties[
|
|
230972
|
+
for (const key4 in shape) {
|
|
230973
|
+
json2.properties[key4] = process2(shape[key4], ctx, {
|
|
230970
230974
|
...params,
|
|
230971
|
-
path: [...params.path, "properties",
|
|
230975
|
+
path: [...params.path, "properties", key4]
|
|
230972
230976
|
});
|
|
230973
230977
|
}
|
|
230974
230978
|
const allKeys = new Set(Object.keys(shape));
|
|
230975
|
-
const requiredKeys = new Set([...allKeys].filter((
|
|
230976
|
-
const v = def.shape[
|
|
230979
|
+
const requiredKeys = new Set([...allKeys].filter((key4) => {
|
|
230980
|
+
const v = def.shape[key4]._zod;
|
|
230977
230981
|
if (ctx.io === "input") {
|
|
230978
230982
|
return v.optin === void 0;
|
|
230979
230983
|
} else {
|
|
@@ -231239,9 +231243,9 @@ function toJSONSchema(input, params) {
|
|
|
231239
231243
|
};
|
|
231240
231244
|
ctx2.external = external;
|
|
231241
231245
|
for (const entry of registry3._idmap.entries()) {
|
|
231242
|
-
const [
|
|
231246
|
+
const [key4, schema] = entry;
|
|
231243
231247
|
extractDefs(ctx2, schema);
|
|
231244
|
-
schemas[
|
|
231248
|
+
schemas[key4] = finalize(ctx2, schema);
|
|
231245
231249
|
}
|
|
231246
231250
|
if (Object.keys(defs).length > 0) {
|
|
231247
231251
|
const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
@@ -231647,14 +231651,14 @@ function _installLazyMethods(inst, group, methods) {
|
|
|
231647
231651
|
if (installed.has(group))
|
|
231648
231652
|
return;
|
|
231649
231653
|
installed.add(group);
|
|
231650
|
-
for (const
|
|
231651
|
-
const fn = methods[
|
|
231652
|
-
Object.defineProperty(proto,
|
|
231654
|
+
for (const key4 in methods) {
|
|
231655
|
+
const fn = methods[key4];
|
|
231656
|
+
Object.defineProperty(proto, key4, {
|
|
231653
231657
|
configurable: true,
|
|
231654
231658
|
enumerable: false,
|
|
231655
231659
|
get() {
|
|
231656
231660
|
const bound = fn.bind(this);
|
|
231657
|
-
Object.defineProperty(this,
|
|
231661
|
+
Object.defineProperty(this, key4, {
|
|
231658
231662
|
configurable: true,
|
|
231659
231663
|
writable: true,
|
|
231660
231664
|
enumerable: true,
|
|
@@ -231663,7 +231667,7 @@ function _installLazyMethods(inst, group, methods) {
|
|
|
231663
231667
|
return bound;
|
|
231664
231668
|
},
|
|
231665
231669
|
set(v) {
|
|
231666
|
-
Object.defineProperty(this,
|
|
231670
|
+
Object.defineProperty(this, key4, {
|
|
231667
231671
|
configurable: true,
|
|
231668
231672
|
writable: true,
|
|
231669
231673
|
enumerable: true,
|
|
@@ -233051,11 +233055,11 @@ function resolveRef(ref, ctx) {
|
|
|
233051
233055
|
}
|
|
233052
233056
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
233053
233057
|
if (path2[0] === defsKey) {
|
|
233054
|
-
const
|
|
233055
|
-
if (!
|
|
233058
|
+
const key4 = path2[1];
|
|
233059
|
+
if (!key4 || !ctx.defs[key4]) {
|
|
233056
233060
|
throw new Error(`Reference not found: ${ref}`);
|
|
233057
233061
|
}
|
|
233058
|
-
return ctx.defs[
|
|
233062
|
+
return ctx.defs[key4];
|
|
233059
233063
|
}
|
|
233060
233064
|
throw new Error(`Reference not found: ${ref}`);
|
|
233061
233065
|
}
|
|
@@ -233241,9 +233245,9 @@ function convertBaseSchema(schema, ctx) {
|
|
|
233241
233245
|
const shape = {};
|
|
233242
233246
|
const properties = schema.properties || {};
|
|
233243
233247
|
const requiredSet = new Set(schema.required || []);
|
|
233244
|
-
for (const [
|
|
233248
|
+
for (const [key4, propSchema] of Object.entries(properties)) {
|
|
233245
233249
|
const propZodSchema = convertSchema(propSchema, ctx);
|
|
233246
|
-
shape[
|
|
233250
|
+
shape[key4] = requiredSet.has(key4) ? propZodSchema : propZodSchema.optional();
|
|
233247
233251
|
}
|
|
233248
233252
|
if (schema.propertyNames) {
|
|
233249
233253
|
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
@@ -233384,20 +233388,20 @@ function convertSchema(schema, ctx) {
|
|
|
233384
233388
|
}
|
|
233385
233389
|
const extraMeta = {};
|
|
233386
233390
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
233387
|
-
for (const
|
|
233388
|
-
if (
|
|
233389
|
-
extraMeta[
|
|
233391
|
+
for (const key4 of coreMetadataKeys) {
|
|
233392
|
+
if (key4 in schema) {
|
|
233393
|
+
extraMeta[key4] = schema[key4];
|
|
233390
233394
|
}
|
|
233391
233395
|
}
|
|
233392
233396
|
const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"];
|
|
233393
|
-
for (const
|
|
233394
|
-
if (
|
|
233395
|
-
extraMeta[
|
|
233397
|
+
for (const key4 of contentMetadataKeys) {
|
|
233398
|
+
if (key4 in schema) {
|
|
233399
|
+
extraMeta[key4] = schema[key4];
|
|
233396
233400
|
}
|
|
233397
233401
|
}
|
|
233398
|
-
for (const
|
|
233399
|
-
if (!RECOGNIZED_KEYS.has(
|
|
233400
|
-
extraMeta[
|
|
233402
|
+
for (const key4 of Object.keys(schema)) {
|
|
233403
|
+
if (!RECOGNIZED_KEYS.has(key4)) {
|
|
233404
|
+
extraMeta[key4] = schema[key4];
|
|
233401
233405
|
}
|
|
233402
233406
|
}
|
|
233403
233407
|
if (Object.keys(extraMeta).length > 0) {
|
|
@@ -233594,10 +233598,10 @@ function namedFeatureEvidence(path2, source) {
|
|
|
233594
233598
|
if (nonProductPath.test(path2)) return [];
|
|
233595
233599
|
const file2 = parseApplicationSource(path2, source);
|
|
233596
233600
|
const findings = [];
|
|
233597
|
-
const add = (node,
|
|
233598
|
-
if (!
|
|
233601
|
+
const add = (node, key4, model, kind, reason) => {
|
|
233602
|
+
if (!key4 || !/^[a-z][a-z0-9_.-]{0,79}$/.test(key4)) return;
|
|
233599
233603
|
findings.push({
|
|
233600
|
-
key:
|
|
233604
|
+
key: key4,
|
|
233601
233605
|
model,
|
|
233602
233606
|
kind,
|
|
233603
233607
|
reason,
|
|
@@ -233619,18 +233623,18 @@ function namedFeatureEvidence(path2, source) {
|
|
|
233619
233623
|
);
|
|
233620
233624
|
if (featureCall || limitCall) {
|
|
233621
233625
|
const literals = node.arguments.map(literalText).filter((v) => v !== null);
|
|
233622
|
-
let
|
|
233626
|
+
let key4 = literals.length === 1 ? literals[0] : null;
|
|
233623
233627
|
for (const arg of node.arguments)
|
|
233624
233628
|
if (import_typescript.default.isObjectLiteralExpression(arg)) {
|
|
233625
233629
|
for (const p of arg.properties)
|
|
233626
233630
|
if (import_typescript.default.isPropertyAssignment(p) && /^(featureKey|feature|capability|entitlement|quotaKey|limitKey|meterKey)$/.test(
|
|
233627
233631
|
p.name.getText(file2).replace(/["']/g, "")
|
|
233628
233632
|
))
|
|
233629
|
-
|
|
233633
|
+
key4 = literalText(p.initializer);
|
|
233630
233634
|
}
|
|
233631
233635
|
add(
|
|
233632
233636
|
node,
|
|
233633
|
-
|
|
233637
|
+
key4,
|
|
233634
233638
|
limitCall ? "limit" : "boolean",
|
|
233635
233639
|
limitCall ? "usage_reporter" : "server_enforcement",
|
|
233636
233640
|
limitCall ? "Application usage or limit check" : "Application access check"
|
|
@@ -233653,8 +233657,8 @@ function namedFeatureEvidence(path2, source) {
|
|
|
233653
233657
|
}
|
|
233654
233658
|
}
|
|
233655
233659
|
if (import_typescript.default.isPropertyAssignment(node)) {
|
|
233656
|
-
const
|
|
233657
|
-
if (/^(usageKey|limitKey|meterKey|featureLimit)$/.test(
|
|
233660
|
+
const key4 = node.name.getText(file2).replace(/["']/g, "");
|
|
233661
|
+
if (/^(usageKey|limitKey|meterKey|featureLimit)$/.test(key4))
|
|
233658
233662
|
add(
|
|
233659
233663
|
node,
|
|
233660
233664
|
literalText(node.initializer),
|
|
@@ -233662,7 +233666,7 @@ function namedFeatureEvidence(path2, source) {
|
|
|
233662
233666
|
"usage_reporter",
|
|
233663
233667
|
"Application usage or limit declaration"
|
|
233664
233668
|
);
|
|
233665
|
-
if (/^(deniedFeatureKey|featureDenied|onFeatureDenied)$/.test(
|
|
233669
|
+
if (/^(deniedFeatureKey|featureDenied|onFeatureDenied)$/.test(key4))
|
|
233666
233670
|
add(
|
|
233667
233671
|
node,
|
|
233668
233672
|
literalText(node.initializer),
|
|
@@ -233693,7 +233697,7 @@ var unsupported = () => new PricingExtractionError(
|
|
|
233693
233697
|
);
|
|
233694
233698
|
var object2 = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
233695
233699
|
var safeKey = (v) => typeof v === "string" && /^[a-z][a-z0-9_.-]{0,79}$/.test(v);
|
|
233696
|
-
var safeProperty = (
|
|
233700
|
+
var safeProperty = (key4) => !["__proto__", "constructor", "prototype"].includes(key4);
|
|
233697
233701
|
function declarations(source, featuresOnly = false) {
|
|
233698
233702
|
const file2 = import_typescript2.default.createSourceFile(
|
|
233699
233703
|
"pricing.ts",
|
|
@@ -233793,13 +233797,13 @@ function declarations(source, featuresOnly = false) {
|
|
|
233793
233797
|
}
|
|
233794
233798
|
if (!import_typescript2.default.isPropertyAssignment(property2) || import_typescript2.default.isComputedPropertyName(property2.name))
|
|
233795
233799
|
throw unsupported();
|
|
233796
|
-
const
|
|
233797
|
-
if (!safeProperty(
|
|
233800
|
+
const key4 = property2.name.getText(file2).replace(/^["']|["']$/g, "");
|
|
233801
|
+
if (!safeProperty(key4)) throw unsupported();
|
|
233798
233802
|
if (featuresOnly && /^(prices|stripePriceId|priceId|stripeProductId|productKey)$/.test(
|
|
233799
|
-
|
|
233803
|
+
key4
|
|
233800
233804
|
))
|
|
233801
233805
|
continue;
|
|
233802
|
-
result3[
|
|
233806
|
+
result3[key4] = next(property2.initializer);
|
|
233803
233807
|
}
|
|
233804
233808
|
return result3;
|
|
233805
233809
|
}
|
|
@@ -233851,14 +233855,14 @@ function extractSetupPricing(source, kind, catalogPrices = [], options = {}) {
|
|
|
233851
233855
|
for (const doc of documents) {
|
|
233852
233856
|
const candidate = object2(doc)?.plans ?? doc;
|
|
233853
233857
|
const rows = Array.isArray(candidate) ? candidate : object2(candidate) ? Object.entries(candidate).map(
|
|
233854
|
-
([
|
|
233858
|
+
([key4, value]) => ({ key: key4, ...object2(value) })
|
|
233855
233859
|
) : [];
|
|
233856
233860
|
for (const value of rows) {
|
|
233857
233861
|
const row = object2(value);
|
|
233858
233862
|
if (!row) continue;
|
|
233859
|
-
const
|
|
233860
|
-
const name = row.name ?? row.displayName ??
|
|
233861
|
-
if (!safeKey(
|
|
233863
|
+
const key4 = row.key ?? row.planKey ?? row.slug ?? row.id;
|
|
233864
|
+
const name = row.name ?? row.displayName ?? key4;
|
|
233865
|
+
if (!safeKey(key4) || typeof name !== "string" || !name.length || name.length > 120)
|
|
233862
233866
|
continue;
|
|
233863
233867
|
if (![
|
|
233864
233868
|
"features",
|
|
@@ -233873,7 +233877,7 @@ function extractSetupPricing(source, kind, catalogPrices = [], options = {}) {
|
|
|
233873
233877
|
const quotas = {};
|
|
233874
233878
|
for (const field of ["features", "capabilities", "quotas"]) {
|
|
233875
233879
|
const raw = row[field];
|
|
233876
|
-
const entries = object2(raw) ? Object.entries(raw) : Array.isArray(raw) && raw.every(safeKey) ? raw.map((
|
|
233880
|
+
const entries = object2(raw) ? Object.entries(raw) : Array.isArray(raw) && raw.every(safeKey) ? raw.map((key5) => [key5, true]) : raw === void 0 ? [] : null;
|
|
233877
233881
|
if (!entries) throw unsupported();
|
|
233878
233882
|
for (const [feature, rawAccess] of entries) {
|
|
233879
233883
|
const structured = object2(rawAccess);
|
|
@@ -233916,30 +233920,33 @@ function extractSetupPricing(source, kind, catalogPrices = [], options = {}) {
|
|
|
233916
233920
|
if (productKey !== void 0 && (typeof productKey !== "string" || !/^prod_[A-Za-z0-9]+$/.test(productKey)))
|
|
233917
233921
|
throw unsupported();
|
|
233918
233922
|
const plan = {
|
|
233919
|
-
key:
|
|
233923
|
+
key: key4,
|
|
233920
233924
|
name,
|
|
233921
233925
|
features,
|
|
233922
233926
|
prices,
|
|
233927
|
+
...row.provenance !== void 0 ? {
|
|
233928
|
+
provenance: external_exports.array(provenanceSchema).max(12).parse(row.provenance)
|
|
233929
|
+
} : {},
|
|
233923
233930
|
...typeof productKey === "string" ? { productKey } : {},
|
|
233924
233931
|
...Object.keys(quotas).length ? { quotas } : {},
|
|
233925
233932
|
...row.components !== void 0 && !options.featuresOnly ? {
|
|
233926
233933
|
components: external_exports.array(componentSchema).max(200).parse(row.components)
|
|
233927
233934
|
} : {}
|
|
233928
233935
|
};
|
|
233929
|
-
if (plans.has(
|
|
233936
|
+
if (plans.has(key4) && JSON.stringify(plans.get(key4)) !== JSON.stringify(plan))
|
|
233930
233937
|
throw new PricingExtractionError(
|
|
233931
233938
|
"needs_review",
|
|
233932
233939
|
"Conflicting plan declarations."
|
|
233933
233940
|
);
|
|
233934
|
-
plans.set(
|
|
233941
|
+
plans.set(key4, plan);
|
|
233935
233942
|
}
|
|
233936
233943
|
}
|
|
233937
233944
|
const featureModels = /* @__PURE__ */ new Map();
|
|
233938
233945
|
for (const plan of plans.values())
|
|
233939
|
-
for (const [
|
|
233940
|
-
const models = featureModels.get(
|
|
233946
|
+
for (const [key4, value] of Object.entries(plan.features)) {
|
|
233947
|
+
const models = featureModels.get(key4) ?? /* @__PURE__ */ new Set();
|
|
233941
233948
|
models.add(typeof value === "boolean" ? "boolean" : "limit");
|
|
233942
|
-
featureModels.set(
|
|
233949
|
+
featureModels.set(key4, models);
|
|
233943
233950
|
}
|
|
233944
233951
|
if ([...featureModels.values()].some((models) => models.size > 1))
|
|
233945
233952
|
throw new PricingExtractionError(
|
|
@@ -233959,9 +233966,89 @@ function extractSetupPricing(source, kind, catalogPrices = [], options = {}) {
|
|
|
233959
233966
|
return [...plans.values()];
|
|
233960
233967
|
}
|
|
233961
233968
|
|
|
233969
|
+
// src/setup-patch.ts
|
|
233970
|
+
var key2 = external_exports.string().regex(/^[a-z][a-z0-9_.-]{0,79}$/);
|
|
233971
|
+
var baselineSchema = external_exports.object({
|
|
233972
|
+
revision: external_exports.string().uuid().nullable(),
|
|
233973
|
+
fingerprint: external_exports.string().regex(/^[a-f0-9]{64}$/).nullable()
|
|
233974
|
+
}).strict();
|
|
233975
|
+
var removal = external_exports.object({
|
|
233976
|
+
planKey: key2,
|
|
233977
|
+
featureKey: key2.optional(),
|
|
233978
|
+
componentKey: key2.optional(),
|
|
233979
|
+
quotaKey: key2.optional()
|
|
233980
|
+
}).strict().refine(
|
|
233981
|
+
(v) => [v.featureKey, v.componentKey, v.quotaKey].filter(Boolean).length <= 1
|
|
233982
|
+
);
|
|
233983
|
+
var fileSchema = external_exports.object({
|
|
233984
|
+
mode: external_exports.enum(["patch", "snapshot"]).default("patch"),
|
|
233985
|
+
plans: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).max(200),
|
|
233986
|
+
removals: external_exports.array(removal).max(2e3).default([]),
|
|
233987
|
+
withdrawDeveloperAnswers: external_exports.array(external_exports.string().min(1).max(240)).max(100).optional(),
|
|
233988
|
+
withdrawLifecycle: external_exports.array(
|
|
233989
|
+
external_exports.object({
|
|
233990
|
+
family: external_exports.string().min(1).max(80),
|
|
233991
|
+
subjectKey: external_exports.string().min(1).max(80).nullable()
|
|
233992
|
+
}).strict()
|
|
233993
|
+
).max(200).optional()
|
|
233994
|
+
}).strict();
|
|
233995
|
+
function extractSetupPatch(source, catalog, baseline) {
|
|
233996
|
+
const raw = JSON.parse(source);
|
|
233997
|
+
const file2 = fileSchema.parse(Array.isArray(raw) ? { plans: raw } : raw);
|
|
233998
|
+
if (new Set(file2.plans.map((p) => p.key)).size !== file2.plans.length)
|
|
233999
|
+
throw new Error("Duplicate plan patches.");
|
|
234000
|
+
const patches = file2.plans.map((row) => {
|
|
234001
|
+
if (Object.keys(row).some(
|
|
234002
|
+
(k) => ![
|
|
234003
|
+
"key",
|
|
234004
|
+
"name",
|
|
234005
|
+
"productKey",
|
|
234006
|
+
"features",
|
|
234007
|
+
"quotas",
|
|
234008
|
+
"prices",
|
|
234009
|
+
"components",
|
|
234010
|
+
"provenance"
|
|
234011
|
+
].includes(k)
|
|
234012
|
+
))
|
|
234013
|
+
throw new Error("Use normalized plan fields in corrections.");
|
|
234014
|
+
const prior = baseline.find((p) => p.key === row.key);
|
|
234015
|
+
const merged = {
|
|
234016
|
+
...prior,
|
|
234017
|
+
...row,
|
|
234018
|
+
features: { ...prior?.features, ...row.features ?? {} }
|
|
234019
|
+
};
|
|
234020
|
+
const normalized = extractSetupPricing(
|
|
234021
|
+
JSON.stringify({ plans: [merged] }),
|
|
234022
|
+
"json",
|
|
234023
|
+
catalog
|
|
234024
|
+
)[0];
|
|
234025
|
+
if (file2.mode === "snapshot") return normalized;
|
|
234026
|
+
const patch = { key: normalized.key };
|
|
234027
|
+
for (const field of Object.keys(row))
|
|
234028
|
+
if (field !== "key")
|
|
234029
|
+
patch[field] = normalized[field] ?? row[field];
|
|
234030
|
+
if (!prior && !row.name) patch.name = normalized.name;
|
|
234031
|
+
if (row.features)
|
|
234032
|
+
patch.features = Object.fromEntries(
|
|
234033
|
+
Object.keys(row.features).map((k) => [
|
|
234034
|
+
k,
|
|
234035
|
+
normalized.features[k]
|
|
234036
|
+
])
|
|
234037
|
+
);
|
|
234038
|
+
return patch;
|
|
234039
|
+
});
|
|
234040
|
+
return {
|
|
234041
|
+
mode: file2.mode,
|
|
234042
|
+
patches,
|
|
234043
|
+
removals: file2.removals,
|
|
234044
|
+
...file2.withdrawDeveloperAnswers ? { withdrawDeveloperAnswers: file2.withdrawDeveloperAnswers } : {},
|
|
234045
|
+
...file2.withdrawLifecycle ? { withdrawLifecycle: file2.withdrawLifecycle } : {}
|
|
234046
|
+
};
|
|
234047
|
+
}
|
|
234048
|
+
|
|
233962
234049
|
// src/identity.ts
|
|
233963
234050
|
var SAASFUNNELS_CLI_NAME = "saasfunnels";
|
|
233964
|
-
var SAASFUNNELS_CLI_VERSION = "0.
|
|
234051
|
+
var SAASFUNNELS_CLI_VERSION = "0.5.1";
|
|
233965
234052
|
var SAASFUNNELS_PRODUCT_NAME = "SaaSFunnels";
|
|
233966
234053
|
var SAASFUNNELS_DEFAULT_API_BASE_URL = "https://app.saasfunnels.ai";
|
|
233967
234054
|
var SAASFUNNELS_ENV = Object.freeze({
|
|
@@ -234372,10 +234459,10 @@ function discoverLifecycleInSource(file2) {
|
|
|
234372
234459
|
return findings;
|
|
234373
234460
|
}
|
|
234374
234461
|
function combineLifecycleFindings(observed, reviewed = []) {
|
|
234375
|
-
const
|
|
234462
|
+
const key4 = (finding) => JSON.stringify([finding.family, finding.subjectKey]);
|
|
234376
234463
|
const groups = /* @__PURE__ */ new Map();
|
|
234377
234464
|
for (const finding of observed) {
|
|
234378
|
-
const id =
|
|
234465
|
+
const id = key4(finding);
|
|
234379
234466
|
const group = groups.get(id);
|
|
234380
234467
|
if (group) group.push(finding);
|
|
234381
234468
|
else groups.set(id, [finding]);
|
|
@@ -234402,7 +234489,7 @@ function combineLifecycleFindings(observed, reviewed = []) {
|
|
|
234402
234489
|
].slice(0, 12)
|
|
234403
234490
|
});
|
|
234404
234491
|
}
|
|
234405
|
-
for (const finding of reviewed) combined.set(
|
|
234492
|
+
for (const finding of reviewed) combined.set(key4(finding), finding);
|
|
234406
234493
|
return setupLifecycleEvidenceSchema.parse([...combined.values()]);
|
|
234407
234494
|
}
|
|
234408
234495
|
|
|
@@ -236863,14 +236950,14 @@ var funnelFeatureBindingEvidenceSchema = external_exports.object({
|
|
|
236863
236950
|
state: external_exports.enum(funnelFeatureBindingStates),
|
|
236864
236951
|
symbol: external_exports.string().min(1).max(240).nullable()
|
|
236865
236952
|
}).strict();
|
|
236866
|
-
var
|
|
236953
|
+
var key3 = external_exports.string().min(1).max(80).regex(/^[a-z][a-z0-9_.-]*$/);
|
|
236867
236954
|
var fingerprint2 = external_exports.string().regex(/^[0-9a-f]{64}$/);
|
|
236868
236955
|
var timestamp2 = external_exports.string().datetime({ offset: true });
|
|
236869
236956
|
var featureInstrumentationBindingSchema = external_exports.object({
|
|
236870
236957
|
bindingIdentityFingerprint: fingerprint2,
|
|
236871
236958
|
bindingKind: external_exports.enum(funnelFeatureBindingKinds),
|
|
236872
236959
|
evidenceFingerprint: fingerprint2,
|
|
236873
|
-
featureKey:
|
|
236960
|
+
featureKey: key3,
|
|
236874
236961
|
line: external_exports.number().int().min(1).max(1e7),
|
|
236875
236962
|
repositoryPath: external_exports.string().min(1).max(1024).refine(
|
|
236876
236963
|
(value) => !value.startsWith("/") && !value.includes("..") && !/(^|\/)(\.env|secrets?|credentials?|private[-_.]?keys?)(\.|\/|$)/i.test(
|
|
@@ -237032,8 +237119,8 @@ function stableKey(value) {
|
|
|
237032
237119
|
const normalized = value.trim().replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^[_\d]+|_+$/g, "").slice(0, 80);
|
|
237033
237120
|
return keyPattern.test(normalized) ? normalized : "feature";
|
|
237034
237121
|
}
|
|
237035
|
-
function displayName(
|
|
237036
|
-
return
|
|
237122
|
+
function displayName(key4) {
|
|
237123
|
+
return key4.split(/[_.-]/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
237037
237124
|
}
|
|
237038
237125
|
function safeRelative(root, target) {
|
|
237039
237126
|
const result3 = relative(root, target).replaceAll("\\", "/");
|
|
@@ -237138,18 +237225,18 @@ function candidatesFromFile(path2, source) {
|
|
|
237138
237225
|
);
|
|
237139
237226
|
const features = /* @__PURE__ */ new Map();
|
|
237140
237227
|
for (const plan of plans)
|
|
237141
|
-
for (const [
|
|
237228
|
+
for (const [key4, value] of Object.entries(plan.features)) {
|
|
237142
237229
|
const model = typeof value === "boolean" ? "boolean" : "limit";
|
|
237143
|
-
if (features.get(
|
|
237144
|
-
features.set(
|
|
237230
|
+
if (features.get(key4) === "limit" && model === "boolean") continue;
|
|
237231
|
+
features.set(key4, model);
|
|
237145
237232
|
}
|
|
237146
|
-
for (const [
|
|
237233
|
+
for (const [key4, model] of features) {
|
|
237147
237234
|
const line = Math.max(
|
|
237148
237235
|
1,
|
|
237149
|
-
source.slice(0, Math.max(0, source.indexOf(
|
|
237236
|
+
source.slice(0, Math.max(0, source.indexOf(key4))).split(/\r?\n/).length
|
|
237150
237237
|
);
|
|
237151
237238
|
const fingerprint3 = sha256(
|
|
237152
|
-
JSON.stringify([path2,
|
|
237239
|
+
JSON.stringify([path2, key4, model, "plan_catalog"])
|
|
237153
237240
|
);
|
|
237154
237241
|
named.push({
|
|
237155
237242
|
accessModel: model,
|
|
@@ -237160,9 +237247,9 @@ function candidatesFromFile(path2, source) {
|
|
|
237160
237247
|
fingerprint: fingerprint3,
|
|
237161
237248
|
id: fingerprint3.slice(0, 12),
|
|
237162
237249
|
line,
|
|
237163
|
-
name: displayName(
|
|
237250
|
+
name: displayName(key4),
|
|
237164
237251
|
rationale: model === "limit" ? "Usage limit declared in application plans" : "Feature access declared in application plans",
|
|
237165
|
-
suggestedKey:
|
|
237252
|
+
suggestedKey: key4,
|
|
237166
237253
|
symbol: "plan_catalog",
|
|
237167
237254
|
unit: null
|
|
237168
237255
|
});
|
|
@@ -237212,8 +237299,8 @@ function manifestFromCandidates(environment, candidates, accepted, mappings, exi
|
|
|
237212
237299
|
])
|
|
237213
237300
|
);
|
|
237214
237301
|
candidates.filter((candidate) => accepted.has(candidate.id)).forEach((candidate) => {
|
|
237215
|
-
const
|
|
237216
|
-
const existing2 = byKey.get(
|
|
237302
|
+
const key4 = stableKey(mappings[candidate.id] ?? candidate.suggestedKey);
|
|
237303
|
+
const existing2 = byKey.get(key4);
|
|
237217
237304
|
const evidence = {
|
|
237218
237305
|
bindingIdentityFingerprint: candidate.bindingIdentityFingerprint,
|
|
237219
237306
|
bindingKind: candidate.bindingKind,
|
|
@@ -237232,13 +237319,13 @@ function manifestFromCandidates(environment, candidates, accepted, mappings, exi
|
|
|
237232
237319
|
}
|
|
237233
237320
|
return;
|
|
237234
237321
|
}
|
|
237235
|
-
byKey.set(
|
|
237322
|
+
byKey.set(key4, {
|
|
237236
237323
|
accessModel: candidate.accessModel,
|
|
237237
237324
|
aliases: [],
|
|
237238
237325
|
description: "",
|
|
237239
237326
|
evidence: [evidence],
|
|
237240
|
-
key:
|
|
237241
|
-
name: displayName(
|
|
237327
|
+
key: key4,
|
|
237328
|
+
name: displayName(key4),
|
|
237242
237329
|
unit: candidate.accessModel === "limit" ? candidate.unit ?? "uses" : null
|
|
237243
237330
|
});
|
|
237244
237331
|
});
|
|
@@ -237651,8 +237738,8 @@ function parseFeatureMappings(values) {
|
|
|
237651
237738
|
const separator = value.indexOf("=");
|
|
237652
237739
|
if (separator <= 0) return [];
|
|
237653
237740
|
const candidate = value.slice(0, separator).trim();
|
|
237654
|
-
const
|
|
237655
|
-
return candidate && keyPattern.test(
|
|
237741
|
+
const key4 = value.slice(separator + 1).trim();
|
|
237742
|
+
return candidate && keyPattern.test(key4) ? [[candidate, key4]] : [];
|
|
237656
237743
|
})
|
|
237657
237744
|
);
|
|
237658
237745
|
}
|
|
@@ -238033,17 +238120,17 @@ function clusterPlanBranches(branches) {
|
|
|
238033
238120
|
for (const branch of branches) {
|
|
238034
238121
|
const fullLocation = `${branch.repositoryPath}::${branch.symbol}`;
|
|
238035
238122
|
const location = fullLocation.length <= 400 ? fullLocation : `${fullLocation.slice(0, 367)}~${createHash5("sha256").update(fullLocation).digest("hex").slice(0, 32)}`;
|
|
238036
|
-
const
|
|
238037
|
-
const existing = clusters.get(
|
|
238123
|
+
const key4 = `${branch.shape}|${location}`;
|
|
238124
|
+
const existing = clusters.get(key4);
|
|
238038
238125
|
if (existing) existing.push(branch);
|
|
238039
|
-
else clusters.set(
|
|
238126
|
+
else clusters.set(key4, [branch]);
|
|
238040
238127
|
}
|
|
238041
|
-
return [...clusters.entries()].map(([
|
|
238128
|
+
return [...clusters.entries()].map(([key4, grouped]) => {
|
|
238042
238129
|
const polarities = new Set(grouped.map((branch) => branch.polarity));
|
|
238043
238130
|
const decided = polarities.has("deny") && polarities.has("grant") ? "unclear" : polarities.has("deny") ? "deny" : polarities.has("grant") ? "grant" : "unclear";
|
|
238044
238131
|
return {
|
|
238045
238132
|
branches: grouped,
|
|
238046
|
-
location:
|
|
238133
|
+
location: key4.slice(key4.indexOf("|") + 1),
|
|
238047
238134
|
planValues: [
|
|
238048
238135
|
...new Set(grouped.map((branch) => branch.planValue))
|
|
238049
238136
|
].sort(),
|
|
@@ -238124,13 +238211,14 @@ async function discoverPlanBranches(input) {
|
|
|
238124
238211
|
var exec4 = promisify4(execFile4);
|
|
238125
238212
|
var hash2 = (text) => createHash6("sha256").update(text).digest("hex");
|
|
238126
238213
|
var contextSchema = external_exports.object({
|
|
238127
|
-
contractVersion: external_exports.literal(
|
|
238214
|
+
contractVersion: external_exports.literal(4),
|
|
238128
238215
|
minimumCliVersion: external_exports.string(),
|
|
238129
238216
|
workspaceId: external_exports.string(),
|
|
238130
238217
|
generation: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
238131
238218
|
installationId: external_exports.string().nullable(),
|
|
238132
238219
|
integrationId: external_exports.string().nullable(),
|
|
238133
238220
|
environment: external_exports.enum(["test", "production"]),
|
|
238221
|
+
sharedInstallation: external_exports.object({ registryRevision: external_exports.number().int().nonnegative().nullable(), fingerprint: external_exports.string().nullable(), verified: external_exports.boolean() }).optional(),
|
|
238134
238222
|
catalogReady: external_exports.boolean(),
|
|
238135
238223
|
planNames: external_exports.array(external_exports.string()),
|
|
238136
238224
|
catalogPrices: external_exports.array(
|
|
@@ -238194,10 +238282,14 @@ async function runGuidedSetup(options) {
|
|
|
238194
238282
|
try {
|
|
238195
238283
|
options.progress?.("1/4 Checking app connection\u2026");
|
|
238196
238284
|
const initialContext = await request("/api/developer-tools/setup/context");
|
|
238197
|
-
if (initialContext.contractVersion !==
|
|
238285
|
+
if (initialContext.contractVersion !== 4)
|
|
238198
238286
|
throw new Error(
|
|
238199
238287
|
"This app does not support this installer yet. Finish deploying the matching Setup release before retrying."
|
|
238200
238288
|
);
|
|
238289
|
+
if (initialContext.patchesAvailable === false)
|
|
238290
|
+
throw new Error(
|
|
238291
|
+
"The app connection is temporarily paused for corrections. Existing findings and decisions are retained. Retry when Setup is available."
|
|
238292
|
+
);
|
|
238201
238293
|
let context = contextSchema.parse(initialContext);
|
|
238202
238294
|
if (!context.installationId || !context.integrationId)
|
|
238203
238295
|
throw new Error(
|
|
@@ -238241,26 +238333,37 @@ async function runGuidedSetup(options) {
|
|
|
238241
238333
|
])
|
|
238242
238334
|
);
|
|
238243
238335
|
const reviewedInputs = await Promise.all(
|
|
238244
|
-
["setup-pricing.json", "setup-answers.json", "setup-lifecycle.json"].map(
|
|
238245
|
-
|
|
238246
|
-
|
|
238247
|
-
|
|
238248
|
-
|
|
238249
|
-
|
|
238250
|
-
|
|
238251
|
-
|
|
238252
|
-
|
|
238253
|
-
|
|
238254
|
-
|
|
238255
|
-
|
|
238256
|
-
|
|
238257
|
-
|
|
238336
|
+
["setup-pricing.json", "setup-answers.json", "setup-lifecycle.json"].map(
|
|
238337
|
+
async (name) => {
|
|
238338
|
+
if (name === "setup-lifecycle.json")
|
|
238339
|
+
return [
|
|
238340
|
+
name,
|
|
238341
|
+
(await readSetupLifecycle(options.cwd))?.fingerprint ?? null
|
|
238342
|
+
];
|
|
238343
|
+
try {
|
|
238344
|
+
return [
|
|
238345
|
+
name,
|
|
238346
|
+
hash2(
|
|
238347
|
+
await readFile6(join6(options.cwd, ".saasfunnels", name), "utf8")
|
|
238348
|
+
)
|
|
238349
|
+
];
|
|
238350
|
+
} catch (error51) {
|
|
238351
|
+
if (error51.code === "ENOENT")
|
|
238352
|
+
return [name, null];
|
|
238353
|
+
throw error51;
|
|
238354
|
+
}
|
|
238258
238355
|
}
|
|
238259
|
-
|
|
238356
|
+
)
|
|
238260
238357
|
);
|
|
238261
|
-
const revision = `${head}:${hash2(JSON.stringify(["configuration-v3", SAASFUNNELS_CLI_VERSION, diff, sourceHashes, reviewedInputs]))}`;
|
|
238262
238358
|
const remote = (await exec4("git", ["remote", "get-url", "origin"], { cwd: options.cwd })).stdout.trim();
|
|
238263
238359
|
const repositoryKey = safeRepositoryKey(remote);
|
|
238360
|
+
const baselineResponse = await request(
|
|
238361
|
+
`/api/developer-tools/setup/baseline?repositoryKey=${encodeURIComponent(repositoryKey)}`
|
|
238362
|
+
);
|
|
238363
|
+
const baseline = baselineSchema.parse(baselineResponse.baseline);
|
|
238364
|
+
if (baselineResponse.generation !== context.generation)
|
|
238365
|
+
throw new Error("The app connection changed. Start setup again.");
|
|
238366
|
+
const revision = `${head}:${hash2(JSON.stringify(["configuration-v4", SAASFUNNELS_CLI_VERSION, diff, sourceHashes, reviewedInputs, baseline]))}`;
|
|
238264
238367
|
const statePath = join6(options.cwd, ".saasfunnels", "setup-run.json");
|
|
238265
238368
|
if (options.resume) {
|
|
238266
238369
|
const saved = JSON.parse(await readFile6(statePath, "utf8"));
|
|
@@ -238283,11 +238386,12 @@ async function runGuidedSetup(options) {
|
|
|
238283
238386
|
run = (await request("/api/developer-tools/setup/runs", {
|
|
238284
238387
|
generation: context.generation,
|
|
238285
238388
|
repositoryKey,
|
|
238286
|
-
repositoryRevisionHash: hash2(revision)
|
|
238389
|
+
repositoryRevisionHash: hash2(revision),
|
|
238390
|
+
baseline
|
|
238287
238391
|
})).run;
|
|
238288
238392
|
if (!run) throw new Error("Setup did not return a run.");
|
|
238289
238393
|
await mkdir3(join6(options.cwd, ".saasfunnels"), { recursive: true });
|
|
238290
|
-
|
|
238394
|
+
const saveRun = () => writeFile3(
|
|
238291
238395
|
statePath,
|
|
238292
238396
|
JSON.stringify(
|
|
238293
238397
|
{
|
|
@@ -238295,13 +238399,32 @@ async function runGuidedSetup(options) {
|
|
|
238295
238399
|
generation: context.generation,
|
|
238296
238400
|
repositoryKey,
|
|
238297
238401
|
revision,
|
|
238298
|
-
runId: run.id
|
|
238402
|
+
runId: run.id,
|
|
238403
|
+
receipts: run.receipts
|
|
238299
238404
|
},
|
|
238300
238405
|
null,
|
|
238301
238406
|
2
|
|
238302
238407
|
) + "\n",
|
|
238303
238408
|
{ mode: 384 }
|
|
238304
238409
|
);
|
|
238410
|
+
await saveRun();
|
|
238411
|
+
try {
|
|
238412
|
+
const shared = JSON.parse(await readFile6(join6(options.cwd, ".saasfunnels", "shared-installation.json"), "utf8"));
|
|
238413
|
+
if (context.sharedInstallation?.registryRevision == null)
|
|
238414
|
+
throw new Error("The app connection has not issued a verified identity yet. Complete its shared installation first.");
|
|
238415
|
+
await request("/api/developer-tools/setup/installation", {
|
|
238416
|
+
...shared,
|
|
238417
|
+
schemaVersion: 1,
|
|
238418
|
+
installationId: context.installationId,
|
|
238419
|
+
installationRevision: context.sharedInstallation.registryRevision,
|
|
238420
|
+
integrationId: context.integrationId,
|
|
238421
|
+
environment: context.environment,
|
|
238422
|
+
repositoryKey,
|
|
238423
|
+
repositoryRevision: head
|
|
238424
|
+
});
|
|
238425
|
+
} catch (error51) {
|
|
238426
|
+
if (error51.code !== "ENOENT") throw error51;
|
|
238427
|
+
}
|
|
238305
238428
|
const update = (state, failureCode = null) => {
|
|
238306
238429
|
progressState = state;
|
|
238307
238430
|
progressFailure = failureCode;
|
|
@@ -238322,6 +238445,7 @@ async function runGuidedSetup(options) {
|
|
|
238322
238445
|
});
|
|
238323
238446
|
return heartbeat;
|
|
238324
238447
|
};
|
|
238448
|
+
let selection = "receiving";
|
|
238325
238449
|
const send = (evidence, proposals, coverage) => {
|
|
238326
238450
|
const currentStage = stage;
|
|
238327
238451
|
if (JSON.stringify({
|
|
@@ -238342,9 +238466,11 @@ async function runGuidedSetup(options) {
|
|
|
238342
238466
|
...proposals ? { proposals } : {},
|
|
238343
238467
|
...coverage ? { coverage } : {}
|
|
238344
238468
|
});
|
|
238469
|
+
selection = result3.selection ?? selection;
|
|
238345
238470
|
if (typeof result3.sequence === "number")
|
|
238346
238471
|
run.sequence = result3.sequence;
|
|
238347
238472
|
run.receipts[currentStage] = result3.receipt ?? { complete: true };
|
|
238473
|
+
await saveRun();
|
|
238348
238474
|
if (currentStage === "plans")
|
|
238349
238475
|
run.planNames = result3.planNames ?? evidence.plans.flatMap((plan) => [plan.key, plan.name]);
|
|
238350
238476
|
});
|
|
@@ -238361,12 +238487,15 @@ async function runGuidedSetup(options) {
|
|
|
238361
238487
|
});
|
|
238362
238488
|
}, 3e4);
|
|
238363
238489
|
let discoveredLifecycle = [];
|
|
238364
|
-
const limitations = await discoverCoverageLimitations(
|
|
238365
|
-
|
|
238366
|
-
|
|
238367
|
-
|
|
238368
|
-
|
|
238369
|
-
|
|
238490
|
+
const limitations = await discoverCoverageLimitations(
|
|
238491
|
+
options.cwd,
|
|
238492
|
+
(file2) => {
|
|
238493
|
+
discoveredLifecycle = combineLifecycleFindings([
|
|
238494
|
+
...discoveredLifecycle,
|
|
238495
|
+
...discoverLifecycleInSource(file2)
|
|
238496
|
+
]);
|
|
238497
|
+
}
|
|
238498
|
+
);
|
|
238370
238499
|
if (limitations.length)
|
|
238371
238500
|
options.progress?.(
|
|
238372
238501
|
"Some app behavior needs manual review. Coverage details will appear with your findings in Setup."
|
|
@@ -238465,11 +238594,20 @@ async function runGuidedSetup(options) {
|
|
|
238465
238594
|
} catch (error51) {
|
|
238466
238595
|
if (error51.code !== "ENOENT") throw error51;
|
|
238467
238596
|
}
|
|
238597
|
+
if ((manual === null ? null : hash2(manual)) !== reviewedInputs.find(([name]) => name === "setup-pricing.json")?.[1])
|
|
238598
|
+
throw new Error(
|
|
238599
|
+
"The app connection, installer, or source changed. Start a fresh scan: npx --yes saasfunnels@latest setup run"
|
|
238600
|
+
);
|
|
238601
|
+
const correction = manual !== null ? extractSetupPatch(
|
|
238602
|
+
manual,
|
|
238603
|
+
context.catalogPrices,
|
|
238604
|
+
baselineResponse.plans ?? []
|
|
238605
|
+
) : null;
|
|
238468
238606
|
const byKey = /* @__PURE__ */ new Map();
|
|
238469
238607
|
const reviewedFiles = [];
|
|
238470
238608
|
const issues = [];
|
|
238471
238609
|
const sources = manual !== null ? [{ path: ".saasfunnels/setup-pricing.json", kind: "json" }] : candidates;
|
|
238472
|
-
for (const candidate of sources) {
|
|
238610
|
+
for (const candidate of correction ? [] : sources) {
|
|
238473
238611
|
try {
|
|
238474
238612
|
const plans = extractSetupPricing(
|
|
238475
238613
|
manual ?? await readFile6(join6(options.cwd, candidate.path), "utf8"),
|
|
@@ -238517,6 +238655,7 @@ async function runGuidedSetup(options) {
|
|
|
238517
238655
|
`Found ${byKey.size} plan proposals in ${reviewedFiles.length} pricing files.`
|
|
238518
238656
|
);
|
|
238519
238657
|
let developerAnswers = void 0;
|
|
238658
|
+
let answerInputFingerprint = null;
|
|
238520
238659
|
try {
|
|
238521
238660
|
const raw = await readFile6(
|
|
238522
238661
|
join6(options.cwd, ".saasfunnels/setup-answers.json"),
|
|
@@ -238524,19 +238663,35 @@ async function runGuidedSetup(options) {
|
|
|
238524
238663
|
);
|
|
238525
238664
|
if (raw.length > 1e5)
|
|
238526
238665
|
throw new Error("Developer answers exceed the upload limit.");
|
|
238666
|
+
answerInputFingerprint = hash2(raw);
|
|
238527
238667
|
developerAnswers = developerAnswersSchema.parse(JSON.parse(raw));
|
|
238528
238668
|
} catch (error51) {
|
|
238529
238669
|
if (error51.code !== "ENOENT") throw error51;
|
|
238530
238670
|
}
|
|
238671
|
+
if (answerInputFingerprint !== reviewedInputs.find(([name]) => name === "setup-answers.json")?.[1])
|
|
238672
|
+
throw new Error(
|
|
238673
|
+
"The app connection, installer, or source changed. Start a fresh scan: npx --yes saasfunnels@latest setup run"
|
|
238674
|
+
);
|
|
238531
238675
|
const lifecycle = await readSetupLifecycle(options.cwd);
|
|
238532
238676
|
if ((lifecycle?.fingerprint ?? null) !== reviewedInputs.find(([name]) => name === "setup-lifecycle.json")?.[1])
|
|
238533
238677
|
throw new LifecycleEvidenceError("changed");
|
|
238534
238678
|
await send({
|
|
238535
238679
|
coverage: { status: "complete", scannedFiles: sources.length },
|
|
238536
238680
|
...developerAnswers ? { developerAnswers } : {},
|
|
238537
|
-
lifecycle: combineLifecycleFindings(
|
|
238538
|
-
|
|
238539
|
-
|
|
238681
|
+
lifecycle: combineLifecycleFindings(
|
|
238682
|
+
discoveredLifecycle,
|
|
238683
|
+
lifecycle?.findings ?? []
|
|
238684
|
+
),
|
|
238685
|
+
plans: correction?.mode === "patch" ? [] : correction ? correction.patches : [...byKey.values()],
|
|
238686
|
+
...correction?.mode === "patch" ? { patches: correction.patches } : {},
|
|
238687
|
+
update: {
|
|
238688
|
+
mode: correction?.mode ?? "snapshot",
|
|
238689
|
+
baseline,
|
|
238690
|
+
removals: correction?.removals ?? [],
|
|
238691
|
+
...correction?.withdrawDeveloperAnswers ? { withdrawDeveloperAnswers: correction.withdrawDeveloperAnswers } : {},
|
|
238692
|
+
...correction?.withdrawLifecycle ? { withdrawLifecycle: correction.withdrawLifecycle } : {}
|
|
238693
|
+
},
|
|
238694
|
+
reviewedFiles: correction ? [".saasfunnels/setup-pricing.json"] : reviewedFiles,
|
|
238540
238695
|
...limitations.length ? { limitations } : {}
|
|
238541
238696
|
});
|
|
238542
238697
|
}
|
|
@@ -238578,14 +238733,15 @@ async function runGuidedSetup(options) {
|
|
|
238578
238733
|
}
|
|
238579
238734
|
return {
|
|
238580
238735
|
exitCode: 0,
|
|
238581
|
-
stdout:
|
|
238736
|
+
stdout: `Discovery submitted. ${selection === "rejected" ? "This submission was rejected in Setup. Current findings and decisions are retained." : selection === "superseded" ? "A newer submission is selected in Setup. Current findings and decisions are retained." : selection === "complete_candidate" ? "Existing findings and decisions are retained; review proposed removals or finish the pending publication in Setup." : "Corrections are ready for review; unrelated records and saved decisions are retained."} Open https://app.saasfunnels.ai/app/setup. Configuration has not been published.
|
|
238737
|
+
`,
|
|
238582
238738
|
stderr: ""
|
|
238583
238739
|
};
|
|
238584
238740
|
} catch (error51) {
|
|
238585
238741
|
clearInterval(timer);
|
|
238586
238742
|
await reportFailure?.().catch(() => {
|
|
238587
238743
|
});
|
|
238588
|
-
const safe = error51 instanceof LifecycleEvidenceError ? error51.message : error51 instanceof Error && /^(Setup request failed|Connect Stripe|The app connection|Use a repository|Feature discovery|Plan discovery|Repository setup)/.test(
|
|
238744
|
+
const safe = error51 instanceof LifecycleEvidenceError ? error51.message : error51 instanceof Error && /^(Setup request failed|Connect Stripe|The app connection|Use a repository|Feature discovery|Plan discovery|Repository setup|This app does not support)/.test(
|
|
238589
238745
|
error51.message
|
|
238590
238746
|
) ? error51.message : "Setup could not finish. Check local repository access and developer credentials, then resume.";
|
|
238591
238747
|
return { exitCode: 2, stdout: "", stderr: safe + "\n" };
|
|
@@ -238623,15 +238779,27 @@ async function submitApprovedSetupPlans(input) {
|
|
|
238623
238779
|
throw new Error(
|
|
238624
238780
|
"Refresh the connected Stripe catalog before submitting plan evidence."
|
|
238625
238781
|
);
|
|
238782
|
+
const baselineResponse = await call(
|
|
238783
|
+
`/api/developer-tools/setup/baseline?repositoryKey=${encodeURIComponent(input.repositoryKey)}`
|
|
238784
|
+
);
|
|
238785
|
+
const baseline = baselineSchema.parse(baselineResponse.baseline);
|
|
238626
238786
|
const { run } = await call("/api/developer-tools/setup/runs", {
|
|
238627
238787
|
generation: context.generation,
|
|
238628
238788
|
repositoryKey: input.repositoryKey,
|
|
238629
|
-
repositoryRevisionHash: hash2(input.revision)
|
|
238789
|
+
repositoryRevisionHash: hash2(input.revision),
|
|
238790
|
+
baseline
|
|
238630
238791
|
});
|
|
238631
238792
|
await call("/api/developer-tools/setup/evidence", {
|
|
238632
238793
|
runId: run.id,
|
|
238633
238794
|
stage: "plans",
|
|
238634
|
-
evidence:
|
|
238795
|
+
evidence: {
|
|
238796
|
+
...input.evidence,
|
|
238797
|
+
coverage: {
|
|
238798
|
+
status: "complete",
|
|
238799
|
+
scannedFiles: input.evidence.reviewedFiles.length
|
|
238800
|
+
},
|
|
238801
|
+
update: { mode: "snapshot", baseline, removals: [] }
|
|
238802
|
+
}
|
|
238635
238803
|
});
|
|
238636
238804
|
return { accepted: true };
|
|
238637
238805
|
}
|
|
@@ -238976,16 +239144,16 @@ function sanitizeString(value) {
|
|
|
238976
239144
|
}
|
|
238977
239145
|
return withoutSecrets;
|
|
238978
239146
|
}
|
|
238979
|
-
function sanitizeJson(value,
|
|
239147
|
+
function sanitizeJson(value, key4 = "", depth = 0) {
|
|
238980
239148
|
if (depth > 8) return "[truncated-depth]";
|
|
238981
239149
|
if (typeof value === "string") {
|
|
238982
|
-
if ((
|
|
239150
|
+
if ((key4 === "testToken" || key4 === "test_token") && /^fet1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{32,256}$/.test(value) && value.length <= 8192)
|
|
238983
239151
|
return value;
|
|
238984
|
-
if (sensitiveKeyPattern3.test(
|
|
239152
|
+
if (sensitiveKeyPattern3.test(key4)) return "[redacted]";
|
|
238985
239153
|
return sanitizeString(value);
|
|
238986
239154
|
}
|
|
238987
239155
|
if (Array.isArray(value))
|
|
238988
|
-
return value.slice(0, 50).map((item) => sanitizeJson(item,
|
|
239156
|
+
return value.slice(0, 50).map((item) => sanitizeJson(item, key4, depth + 1));
|
|
238989
239157
|
if (!value || typeof value !== "object") return value;
|
|
238990
239158
|
return Object.fromEntries(
|
|
238991
239159
|
Object.entries(value).slice(0, 100).map(([nestedKey, nestedValue]) => [
|
|
@@ -238999,8 +239167,8 @@ function saasFunnelsPublicValue(value) {
|
|
|
238999
239167
|
if (Array.isArray(value)) return value.map(saasFunnelsPublicValue);
|
|
239000
239168
|
if (!value || typeof value !== "object") return value;
|
|
239001
239169
|
return Object.fromEntries(
|
|
239002
|
-
Object.entries(value).map(([
|
|
239003
|
-
|
|
239170
|
+
Object.entries(value).map(([key4, nested]) => [
|
|
239171
|
+
key4,
|
|
239004
239172
|
saasFunnelsPublicValue(nested)
|
|
239005
239173
|
])
|
|
239006
239174
|
);
|
|
@@ -239752,8 +239920,8 @@ async function parseResponseJson(response) {
|
|
|
239752
239920
|
}
|
|
239753
239921
|
}
|
|
239754
239922
|
async function developerGet(path2, args, options) {
|
|
239755
|
-
const
|
|
239756
|
-
const authorization = options.authorizationHeader ?? (
|
|
239923
|
+
const key4 = envValue(options, SAASFUNNELS_ENV.apiKey);
|
|
239924
|
+
const authorization = options.authorizationHeader ?? (key4 ? `Bearer ${key4}` : void 0);
|
|
239757
239925
|
if (!authorization) {
|
|
239758
239926
|
throw new McpToolExecutionError("Missing SAASFUNNELS_API_KEY.", {
|
|
239759
239927
|
error: "Missing SAASFUNNELS_API_KEY for live developer reads.",
|
|
@@ -239788,8 +239956,8 @@ async function developerGet(path2, args, options) {
|
|
|
239788
239956
|
return body;
|
|
239789
239957
|
}
|
|
239790
239958
|
async function developerPost(path2, args, body, options, requiredScope) {
|
|
239791
|
-
const
|
|
239792
|
-
const authorization = options.authorizationHeader ?? (
|
|
239959
|
+
const key4 = envValue(options, SAASFUNNELS_ENV.apiKey);
|
|
239960
|
+
const authorization = options.authorizationHeader ?? (key4 ? `Bearer ${key4}` : void 0);
|
|
239793
239961
|
if (!authorization) {
|
|
239794
239962
|
throw new McpToolExecutionError("Missing SAASFUNNELS_API_KEY.", {
|
|
239795
239963
|
error: "Missing SAASFUNNELS_API_KEY for this Funnel operation.",
|
|
@@ -239835,8 +240003,8 @@ async function sendTestEvent(args, options) {
|
|
|
239835
240003
|
schema_version: DEVELOPER_TOOLS_CONTRACT_SCHEMA_VERSION
|
|
239836
240004
|
});
|
|
239837
240005
|
}
|
|
239838
|
-
const
|
|
239839
|
-
if (!
|
|
240006
|
+
const key4 = envValue(options, SAASFUNNELS_ENV.ingestApiKey);
|
|
240007
|
+
if (!key4) {
|
|
239840
240008
|
throw new McpToolExecutionError("Missing SAASFUNNELS_INGEST_API_KEY.", {
|
|
239841
240009
|
error: "Missing SAASFUNNELS_INGEST_API_KEY for setup smoke event sends.",
|
|
239842
240010
|
ok: false,
|
|
@@ -239851,7 +240019,7 @@ async function sendTestEvent(args, options) {
|
|
|
239851
240019
|
{
|
|
239852
240020
|
body: JSON.stringify(payload),
|
|
239853
240021
|
headers: {
|
|
239854
|
-
authorization: `Bearer ${
|
|
240022
|
+
authorization: `Bearer ${key4}`,
|
|
239855
240023
|
"content-type": "application/json"
|
|
239856
240024
|
},
|
|
239857
240025
|
method: "POST"
|
|
@@ -240367,12 +240535,12 @@ function result(exitCode, stdout = "", stderr = "") {
|
|
|
240367
240535
|
stdout: redactOutput(stdout)
|
|
240368
240536
|
};
|
|
240369
240537
|
}
|
|
240370
|
-
function redactStructured(value,
|
|
240538
|
+
function redactStructured(value, key4) {
|
|
240371
240539
|
if (typeof value === "string") {
|
|
240372
|
-
return
|
|
240540
|
+
return key4 && pathValuedKeys.has(key4) ? value : redactOutput(value);
|
|
240373
240541
|
}
|
|
240374
240542
|
if (Array.isArray(value)) {
|
|
240375
|
-
return value.map((item) => redactStructured(item,
|
|
240543
|
+
return value.map((item) => redactStructured(item, key4));
|
|
240376
240544
|
}
|
|
240377
240545
|
if (value && typeof value === "object") {
|
|
240378
240546
|
return Object.fromEntries(
|
|
@@ -240624,7 +240792,14 @@ async function commandFeatures(args, flags, options) {
|
|
|
240624
240792
|
}
|
|
240625
240793
|
if (args[0] === "handoff") {
|
|
240626
240794
|
const path2 = flagString(flags, "file") ?? ".saasfunnels/catalog.yaml";
|
|
240627
|
-
const
|
|
240795
|
+
const gitValue = async (...args2) => {
|
|
240796
|
+
try {
|
|
240797
|
+
return (await promisify5(execFile5)("git", args2, { cwd: cwd(options), timeout: 5e3, maxBuffer: 8192 })).stdout.trim();
|
|
240798
|
+
} catch {
|
|
240799
|
+
return "";
|
|
240800
|
+
}
|
|
240801
|
+
};
|
|
240802
|
+
const repositoryRevision = flagString(flags, "repository-revision") ?? await gitValue("rev-parse", "HEAD");
|
|
240628
240803
|
if (!repositoryRevision) {
|
|
240629
240804
|
return result(
|
|
240630
240805
|
2,
|
|
@@ -240632,7 +240807,16 @@ async function commandFeatures(args, flags, options) {
|
|
|
240632
240807
|
"Missing --repository-revision for the structured Feature handoff.\n"
|
|
240633
240808
|
);
|
|
240634
240809
|
}
|
|
240635
|
-
|
|
240810
|
+
let repositoryKey = flagString(flags, "repository-key");
|
|
240811
|
+
if (!repositoryKey) {
|
|
240812
|
+
const remote = await gitValue("remote", "get-url", "origin");
|
|
240813
|
+
if (remote) {
|
|
240814
|
+
try {
|
|
240815
|
+
repositoryKey = safeRepositoryKey(remote);
|
|
240816
|
+
} catch {
|
|
240817
|
+
}
|
|
240818
|
+
}
|
|
240819
|
+
}
|
|
240636
240820
|
if (!repositoryKey) {
|
|
240637
240821
|
return result(
|
|
240638
240822
|
2,
|
|
@@ -240653,10 +240837,32 @@ async function commandFeatures(args, flags, options) {
|
|
|
240653
240837
|
);
|
|
240654
240838
|
}
|
|
240655
240839
|
const discoveryRoots = (flagString(flags, "discovery-roots") ?? "").split(",").map((root) => root.trim()).filter(Boolean);
|
|
240656
|
-
|
|
240657
|
-
|
|
240658
|
-
"utf8"
|
|
240659
|
-
)
|
|
240840
|
+
let source;
|
|
240841
|
+
try {
|
|
240842
|
+
source = await filesystem(options).readFile(resolve5(cwd(options), path2), "utf8");
|
|
240843
|
+
} catch (error51) {
|
|
240844
|
+
if (error51.code !== "ENOENT") throw error51;
|
|
240845
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.apiKey);
|
|
240846
|
+
if (key4 && !flagString(flags, "file")) {
|
|
240847
|
+
const query = new URLSearchParams({ repositoryKey, repositoryRevision, environment: flagString(flags, "environment") ?? "production", ...flagString(flags, "discovery-roots") ? { discoveryRoots: JSON.stringify([...discoveryRoots].sort()) } : {} });
|
|
240848
|
+
try {
|
|
240849
|
+
const response = await (options.fetch ?? fetch)(`${apiBaseUrl2(options, flags)}/api/developer-tools/features/instrumentation?${query}`, { headers: { authorization: `Bearer ${key4}` }, signal: AbortSignal.timeout(15e3) });
|
|
240850
|
+
if (response.ok) {
|
|
240851
|
+
const evidence = await response.json();
|
|
240852
|
+
if (evidence.reused === true) return jsonMode(flags) ? jsonResult(0, { reused: true, currentRevision: evidence.currentRevision === true, manifestFingerprint: evidence.manifestFingerprint, validatedAt: evidence.validatedAt }) : result(
|
|
240853
|
+
0,
|
|
240854
|
+
`Reused the existing workspace Feature evidence. No catalog was uploaded.${evidence.currentRevision ? "" : " This is the previous scan, not verification of this checkout; Setup shows any remaining review."} Open Setup to continue.
|
|
240855
|
+
`
|
|
240856
|
+
);
|
|
240857
|
+
} else if (response.status !== 404) {
|
|
240858
|
+
return result(2, "", "Workspace Feature evidence could not be checked. Open Setup to check the connection and resume; your existing catalog has not changed.\n");
|
|
240859
|
+
}
|
|
240860
|
+
} catch {
|
|
240861
|
+
return result(2, "", "Workspace Feature evidence could not be checked. Open Setup to check the connection and resume; your existing catalog has not changed.\n");
|
|
240862
|
+
}
|
|
240863
|
+
}
|
|
240864
|
+
return result(2, "", "No local discovery file was found. Open Setup to reuse your workspace catalog and finish any missing connection steps. Do not recreate the catalog.\n");
|
|
240865
|
+
}
|
|
240660
240866
|
const validation = parseFeatureManifestSource(source);
|
|
240661
240867
|
if (!validation.ok || !validation.manifest) {
|
|
240662
240868
|
return jsonMode(flags) ? jsonResult(1, validation) : result(
|
|
@@ -240688,8 +240894,8 @@ ${validation.errors.map((error51) => `- ${error51}`).join("\n")}
|
|
|
240688
240894
|
sdkVersions
|
|
240689
240895
|
});
|
|
240690
240896
|
if (hasFlag(flags, "send")) {
|
|
240691
|
-
const
|
|
240692
|
-
if (!
|
|
240897
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.apiKey);
|
|
240898
|
+
if (!key4)
|
|
240693
240899
|
return result(
|
|
240694
240900
|
2,
|
|
240695
240901
|
"",
|
|
@@ -240701,7 +240907,7 @@ ${validation.errors.map((error51) => `- ${error51}`).join("\n")}
|
|
|
240701
240907
|
{
|
|
240702
240908
|
body: JSON.stringify(handoff),
|
|
240703
240909
|
headers: {
|
|
240704
|
-
authorization: `Bearer ${
|
|
240910
|
+
authorization: `Bearer ${key4}`,
|
|
240705
240911
|
"content-type": "application/json"
|
|
240706
240912
|
},
|
|
240707
240913
|
method: "POST"
|
|
@@ -240804,8 +241010,8 @@ function commandEventsSample(flags) {
|
|
|
240804
241010
|
);
|
|
240805
241011
|
}
|
|
240806
241012
|
async function commandEventsSendTest(args, flags, options) {
|
|
240807
|
-
const
|
|
240808
|
-
if (!
|
|
241013
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.ingestApiKey) ?? flagString(flags, "api-key");
|
|
241014
|
+
if (!key4)
|
|
240809
241015
|
return result(2, "", "Missing SAASFUNNELS_INGEST_API_KEY for send-test.\n");
|
|
240810
241016
|
const filePath = flagString(flags, "file") ?? args[0];
|
|
240811
241017
|
const payload = filePath ? await readJsonFile(filePath, options) : getDeveloperToolSourceContract("direct").sample_payload;
|
|
@@ -240815,7 +241021,7 @@ async function commandEventsSendTest(args, flags, options) {
|
|
|
240815
241021
|
{
|
|
240816
241022
|
body: JSON.stringify(payload),
|
|
240817
241023
|
headers: {
|
|
240818
|
-
authorization: `Bearer ${
|
|
241024
|
+
authorization: `Bearer ${key4}`,
|
|
240819
241025
|
"content-type": "application/json"
|
|
240820
241026
|
},
|
|
240821
241027
|
method: "POST"
|
|
@@ -240841,8 +241047,8 @@ async function commandEventsSendTest(args, flags, options) {
|
|
|
240841
241047
|
);
|
|
240842
241048
|
}
|
|
240843
241049
|
async function developerGet2(path2, flags, options) {
|
|
240844
|
-
const
|
|
240845
|
-
if (!
|
|
241050
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.apiKey) ?? flagString(flags, "api-key");
|
|
241051
|
+
if (!key4)
|
|
240846
241052
|
throw new Error(
|
|
240847
241053
|
"Missing SAASFUNNELS_API_KEY for live developer diagnostics."
|
|
240848
241054
|
);
|
|
@@ -240850,7 +241056,7 @@ async function developerGet2(path2, flags, options) {
|
|
|
240850
241056
|
`${apiBaseUrl2(options, flags)}${path2}`,
|
|
240851
241057
|
{
|
|
240852
241058
|
headers: {
|
|
240853
|
-
authorization: `Bearer ${
|
|
241059
|
+
authorization: `Bearer ${key4}`
|
|
240854
241060
|
},
|
|
240855
241061
|
method: "GET"
|
|
240856
241062
|
}
|
|
@@ -241150,8 +241356,8 @@ async function commandPlans(args, flags, options) {
|
|
|
241150
241356
|
const repositoryRevision = flagString(flags, "repository-revision");
|
|
241151
241357
|
if (!repositoryRevision)
|
|
241152
241358
|
return result(2, "", "Missing --repository-revision for the plan branch handoff.\n");
|
|
241153
|
-
const
|
|
241154
|
-
if (!
|
|
241359
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.apiKey);
|
|
241360
|
+
if (!key4)
|
|
241155
241361
|
return result(2, "", "Missing SAASFUNNELS_API_KEY with features:write for --send.\n");
|
|
241156
241362
|
const payload = {
|
|
241157
241363
|
clusters: clusters.map((cluster) => ({
|
|
@@ -241181,7 +241387,7 @@ async function commandPlans(args, flags, options) {
|
|
|
241181
241387
|
{
|
|
241182
241388
|
body: JSON.stringify(payload),
|
|
241183
241389
|
headers: {
|
|
241184
|
-
authorization: `Bearer ${
|
|
241390
|
+
authorization: `Bearer ${key4}`,
|
|
241185
241391
|
"content-type": "application/json"
|
|
241186
241392
|
},
|
|
241187
241393
|
method: "POST"
|
|
@@ -241300,8 +241506,8 @@ Add --send to upload.
|
|
|
241300
241506
|
`
|
|
241301
241507
|
);
|
|
241302
241508
|
}
|
|
241303
|
-
const
|
|
241304
|
-
if (!
|
|
241509
|
+
const key4 = envValue2(options, SAASFUNNELS_ENV.apiKey);
|
|
241510
|
+
if (!key4)
|
|
241305
241511
|
return result(
|
|
241306
241512
|
2,
|
|
241307
241513
|
"",
|
|
@@ -241311,7 +241517,7 @@ Add --send to upload.
|
|
|
241311
241517
|
const plans = inputs.flatMap((entry) => extractSetupPricing(entry.content, entry.kind));
|
|
241312
241518
|
await submitApprovedSetupPlans({
|
|
241313
241519
|
apiBaseUrl: apiBaseUrl2(options, flags),
|
|
241314
|
-
key:
|
|
241520
|
+
key: key4,
|
|
241315
241521
|
repositoryKey,
|
|
241316
241522
|
revision: repositoryRevision,
|
|
241317
241523
|
integrationId,
|