@shaxpir/duiduidui-models 1.9.27 → 1.9.28

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.
@@ -160,6 +160,14 @@ exports.Condition = {
160
160
  .join(', ');
161
161
  errors.push(`Conditions [${conflictingTypes}] in 'any' section require a term record, but has_term is false`);
162
162
  }
163
+ // Check for contradictory difficulty conditions (min >= max)
164
+ const difficultyCondition = conditions.all?.find(c => c.type === 'difficulty');
165
+ if (difficultyCondition) {
166
+ const { min, max } = difficultyCondition;
167
+ if (min !== undefined && max !== undefined && min >= max) {
168
+ errors.push(`Min difficulty (${min}) must be less than max difficulty (${max})`);
169
+ }
170
+ }
163
171
  return errors;
164
172
  },
165
173
  // Backward compatibility aliases (deprecated - use requiresStarred/allowsStarred/excludesStarred instead)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaxpir/duiduidui-models",
3
- "version": "1.9.27",
3
+ "version": "1.9.28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/shaxpir/duiduidui-models"