@sdeverywhere/check-core 0.1.11 → 0.1.13
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/dist/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -5
- package/dist/index.d.ts +29 -5
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3811,7 +3811,7 @@ function resolveScenarioForInputSpecs(modelInputsL, modelInputsR, key, id, title
|
|
|
3811
3811
|
};
|
|
3812
3812
|
}
|
|
3813
3813
|
function resolveScenarioForDistinctInputSpecs(modelInputsL, modelInputsR, key, id, title, subtitle, inputSpecsL, inputSpecsR) {
|
|
3814
|
-
const
|
|
3814
|
+
const inputsWithIssues = [];
|
|
3815
3815
|
const settingsL = [];
|
|
3816
3816
|
const settingsR = [];
|
|
3817
3817
|
function resolveInputSpec(side, modelInputs, inputSpec) {
|
|
@@ -3826,13 +3826,14 @@ function resolveScenarioForDistinctInputSpecs(modelInputsL, modelInputsR, key, i
|
|
|
3826
3826
|
default:
|
|
3827
3827
|
(0, import_assert_never10.assertNever)(inputSpec);
|
|
3828
3828
|
}
|
|
3829
|
-
if (inputState.error !== void 0) {
|
|
3830
|
-
|
|
3829
|
+
if (inputState.error !== void 0 || inputState.warning !== void 0) {
|
|
3830
|
+
inputsWithIssues.push({
|
|
3831
3831
|
requestedName: inputSpec.inputName,
|
|
3832
3832
|
stateL: side === "left" ? inputState : {},
|
|
3833
3833
|
stateR: side === "right" ? inputState : {}
|
|
3834
3834
|
});
|
|
3835
|
-
}
|
|
3835
|
+
}
|
|
3836
|
+
if (inputState.error === void 0 && inputState.inputVar !== void 0) {
|
|
3836
3837
|
const inputSetting = inputSettingFromResolvedInputState(inputState);
|
|
3837
3838
|
if (side === "left") {
|
|
3838
3839
|
settingsL.push(inputSetting);
|
|
@@ -3843,9 +3844,12 @@ function resolveScenarioForDistinctInputSpecs(modelInputsL, modelInputsR, key, i
|
|
|
3843
3844
|
}
|
|
3844
3845
|
inputSpecsL.forEach((inputSpec) => resolveInputSpec("left", modelInputsL, inputSpec));
|
|
3845
3846
|
inputSpecsR.forEach((inputSpec) => resolveInputSpec("right", modelInputsR, inputSpec));
|
|
3847
|
+
const hasFatalError = inputsWithIssues.some(
|
|
3848
|
+
(input) => input.stateL.error !== void 0 || input.stateR.error !== void 0
|
|
3849
|
+
);
|
|
3846
3850
|
let specL;
|
|
3847
3851
|
let specR;
|
|
3848
|
-
if (
|
|
3852
|
+
if (!hasFatalError) {
|
|
3849
3853
|
specL = inputSettingsSpec(settingsL);
|
|
3850
3854
|
specR = inputSettingsSpec(settingsR);
|
|
3851
3855
|
}
|
|
@@ -3857,7 +3861,7 @@ function resolveScenarioForDistinctInputSpecs(modelInputsL, modelInputsR, key, i
|
|
|
3857
3861
|
subtitle,
|
|
3858
3862
|
settings: {
|
|
3859
3863
|
kind: "input-settings",
|
|
3860
|
-
inputs:
|
|
3864
|
+
inputs: inputsWithIssues
|
|
3861
3865
|
},
|
|
3862
3866
|
specL,
|
|
3863
3867
|
specR
|
|
@@ -4024,8 +4028,10 @@ function resolveInputVarAtValue(inputVar, value) {
|
|
|
4024
4028
|
};
|
|
4025
4029
|
} else {
|
|
4026
4030
|
return {
|
|
4027
|
-
|
|
4028
|
-
|
|
4031
|
+
inputVar,
|
|
4032
|
+
value,
|
|
4033
|
+
warning: {
|
|
4034
|
+
kind: "value-out-of-range"
|
|
4029
4035
|
}
|
|
4030
4036
|
};
|
|
4031
4037
|
}
|