node-red-contrib-uos-nats 0.2.57 → 0.2.58

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.
Files changed (2) hide show
  1. package/lib/payloads.js +2 -1
  2. package/package.json +1 -1
package/lib/payloads.js CHANGED
@@ -325,7 +325,8 @@ function encodeVariableState(def, state) {
325
325
  switch (def.dataType) {
326
326
  case 'INT64': {
327
327
  const intVal = new VariableValueInt64T();
328
- intVal.value = (value !== null && value !== undefined) ? BigInt(value) : BigInt(0);
328
+ // Match sample: Use Math.trunc() to be safe if a Float arrives for an Int definition
329
+ intVal.value = (value !== null && value !== undefined) ? BigInt(Math.trunc(Number(value))) : BigInt(0);
329
330
  varT.value = intVal;
330
331
  varT.valueType = VariableValue.Int64;
331
332
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-uos-nats",
3
- "version": "0.2.57",
3
+ "version": "0.2.58",
4
4
  "description": "Node-RED nodes for Weidmüller u-OS Data Hub. Read, write, and provide variables via NATS protocol with OAuth2 authentication. Features: Variable Key resolution, custom icons, example flows, and provider definition caching.",
5
5
  "author": {
6
6
  "name": "IoTUeli",