Commit Graph

3 Commits

Author SHA1 Message Date
znetsixe
ff9aec8702 P10.5: fix 4 pre-existing test failures (output + validation)
outputUtils.formatMsg: fall back to \`<softwareType>_<id>\` when
config.general.name is unset — restores the convention the original
test expected; safer for nodes whose name isn't required at registration.

collectionValidators.validateArray + validateSet: replace \`|| 1\` with
\`?? 1\` so explicit minLength: 0 lets through empty arrays. Was
swallowing the 0 as falsy and clamping minimum to 1.

validationUtils: add public validateCurve wrapper around the helper so
callers can validate raw curves without going through validateSchema.

Test suite: 170 total / 170 pass (was 4 fail).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:21:13 +02:00
znetsixe
f96476bd23 Merge commit '12fce6c' into HEAD
# Conflicts:
#	index.js
#	src/configs/index.js
#	src/configs/machineGroupControl.json
#	src/helper/assetUtils.js
#	src/helper/childRegistrationUtils.js
#	src/helper/configUtils.js
#	src/helper/logger.js
#	src/helper/menuUtils.js
#	src/helper/menuUtils_DEPRECATED.js
#	src/helper/outputUtils.js
#	src/helper/validationUtils.js
#	src/measurements/Measurement.js
#	src/measurements/MeasurementContainer.js
#	src/measurements/examples.js
#	src/outliers/outlierDetection.js
2026-03-31 18:07:57 +02:00
Rene De Ren
fe2631f29b refactor: extract validators from validationUtils.js into strategy pattern modules
Break the 548-line monolith into focused modules:
- validators/typeValidators.js (number, integer, boolean, string, enum)
- validators/collectionValidators.js (array, set, object)
- validators/curveValidator.js (curve, machineCurve, dimensionStructure)

validationUtils.js now uses a VALIDATORS registry map and delegates to
extracted modules. Reduced from 548 to 217 lines.

Closes #2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:15:01 +01:00