Commit Graph

26 Commits

Author SHA1 Message Date
Rene De Ren
31928fd124 fix: add missing migrateConfig method, config versioning, and formatters module
ConfigManager.migrateConfig() was called but never defined — would crash at runtime.
Added config version checking, migration support, and fixed createEndpoint indentation.
New formatters module (csv, influxdb, json) for pluggable output formatting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:33:22 +01:00
Rene De Ren
dec5f63b21 refactor: adopt POSITIONS constants, fix ESLint warnings, break menuUtils into modules
- Replace hardcoded position strings with POSITIONS.* constants
- Prefix unused variables with _ to resolve no-unused-vars warnings
- Fix no-prototype-builtins with Object.prototype.hasOwnProperty.call()
- Extract menuUtils.js (543 lines) into 6 focused modules under menu/
- menuUtils.js now 35 lines, delegates via prototype mixin pattern
- Add 158 unit tests for ConfigManager, MeasurementContainer, ValidationUtils

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:36:52 +01: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
Rene De Ren
f95ef43f05 Standardize softwareType to lowercase everywhere
- ConfigManager.buildConfig() now lowercases softwareType
- Updated config JSON defaults to lowercase
- childRegistrationUtils lowercases softwareType on extraction
- Closes #8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:06:41 +01:00
Rene De Ren
89aec9a7eb Reset chaining context in MeasurementContainer.clear()
Closes #25

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:06:17 +01:00
Rene De Ren
c698e5a1bc Remove deprecated menuUtils and childRegistrationUtils files
Closes #6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:56:28 +01:00
Rene De Ren
82094d8d09 Fix ESLint errors, bugs, and add gravity export
- Fix missing return in childRegistrationUtils.registerChild()
- Fix assertionUtils: assertNoNaN uses this.assertNoNaN
- Fix logger: nameModule uses this.nameModule
- Fix assetUtils: convert ESM to CommonJS
- Fix childRegistrationUtils_DEPRECATED: desc -> softwareType
- Add gravity export to index.js for rotatingMachine
- Fix ESLint errors across 18 files (no-undef, no-case-declarations,
  no-mixed-spaces-and-tabs, parsing errors)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:39:40 +01:00
p.vanderwilt
9d8da15d0e Merge pull request 'Register multiple parents during child registration' (#9) from dev-Pieter into main
Reviewed-on: https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions/pulls/9
2025-10-31 10:36:28 +00:00
p.vanderwilt
f653a1e98c Refactor child setup to support multiple parents consistently 2025-10-24 13:37:26 +02:00
znetsixe
de0b947c56 Updated distance in measurement helper so its a settable compoment. See example.js file in measurement helper folder 2025-10-05 09:34:00 +02:00
Rene De ren
d99561fa80 need to further update measurement emit function 2025-10-03 15:37:08 +02:00
p.vanderwilt
3886277616 Fix bug in parent registration code block 2025-09-29 17:13:34 +02:00
p.vanderwilt
83018fabe0 Allow for multiple parents 2025-09-29 16:06:06 +02:00
znetsixe
d72bfd5560 updated files 2025-09-22 16:02:04 +02:00
znetsixe
241ed1d3cb errormetrics fix 2025-09-16 12:10:41 +02:00
znetsixe
50f99fa642 updated registration logic to be consise 2025-09-04 17:06:30 +02:00
znetsixe
e87f9da4bf license update and enhancements to measurement functionality + child parent relationship 2025-08-07 13:52:29 +02:00
znetsixe
7061d6a539 added support for valve and valvegroupcontrol 2025-07-31 09:09:25 +02:00
znetsixe
2540d19b76 updates to accomodate valve node 2025-07-24 13:17:10 +02:00
p.vanderwilt
950ca2b6b4 Added assertions utility for error handling and validation 2025-07-08 12:57:22 +02:00
znetsixe
4665949c88 bug fixes 2025-07-02 10:54:01 +02:00
znetsixe
a2018509ef updates to make generic functions work 2025-07-01 17:05:09 +02:00
znetsixe
63c5463160 updates 2025-06-25 14:59:37 +02:00
znetsixe
3198690a81 standaardisation updates 2025-06-25 10:55:50 +02:00
znetsixe
dbc36c2f57 cleaned up method 2025-06-12 17:04:02 +02:00
znetsixe
bc9e3cda90 changed the folder and added index.js 2025-06-10 12:36:39 +02:00