Skip to content

Releases: telefonicaid/iotagent-node-lib

2.23.0

02 Aug 10:11
7d86694
Compare
Choose a tag to compare

What's Changed

Since 2.22.0:

  • Add: support of object_id as part of explicitAttrs list (#1267)
  • Fix: make available measures in JEXL context for explicitAttrs (#1269)

Full Changelog: 2.22.0...2.23.0

2.22.0

15 Jul 09:31
743e29e
Compare
Choose a tag to compare

Changes (since 2.21.0):

  • Add: add id, type, service and subservice to context expression of multientity plugin
  • Add: set jexl as default parser for generic plugin
  • Add: entityNameExp to Group Model to allow define device.name using expressions (#1222, #1145)
  • Add: identify each flow of mongo alarms about device group
  • Add: support for NGSI-LD LanguageProperty
  • Add: NGSI-LD PUT support
  • Add: NGSI-LD support for multiple attribute updates
  • Fix: apply expressions to pull commands (#1263)
  • Fix: return error to client if expression or multientity plugins get error
  • Fix: multientity just with entity_type but not entity_name, then use device.name (#1220)
  • Fix: allow use JEXL expresions in explicitAttrs for conditional propagation of measures (reopen #1179, for Devices)
  • Fix: avoid raising mongo alarm (DEVICE_GROUP_NOT_FOUND) before launch op against CB
  • Fix: fix issue with unrecognized NGSILD-Tenant and NGSILD-Path headers
  • Fix: mongodb dependency moved to devDependencies (as it is used only in test code)
  • Upgrade mongodb dep from 3.6.12 to 4.7.0
  • Upgrade body-parser dependency from 1.19.0 to 1.20.0
  • Upgrade express dependency from 4.16.4 to 4.18.1
  • Upgrade got dependency from 11.8.2 to 11.8.5
  • Upgrade moment-timezone dependency from 0.5.25 to 0.5.34
  • Upgrade mongoose dependency from 5.7.14 to 5.13.14
  • Upgrade query-string dependency from 6.5.0 to 7.1.1
  • Upgrade underscore dependency from 1.12.1 to 1.13.4
  • Upgrade uuid dependency from 3.3.2 to 8.3.2
  • Upgrade coveralls dev dependency from 3.1.0 to 3.1.1
  • Upgrade eslint dev dependency from 7.5.0 to 8.18.0
  • Upgrade eslint-config-tamia dev dependency from 7.2.5 to 8.0.0
  • Upgrade eslint-plugin-prettier dev dependency from 3.1.4 to 4.0.0
  • Upgrade lint-staged dev dependency from 10.2.11 to 12.3.8
  • Upgrade prettier dev dependency from 2.0.5 to 2.7.1
  • Upgrade mocha dev dependency from 8.0.1 to 10.0.0
  • Upgrade nock dev dependency from 13.0.3 to 13.2.7
  • Upgrade remark-cli dev dependency from 8.0.1 to 10.0.1
  • Upgrade remark-preset-lint-recommended dev dependency from 4.0.1 to 6.1.2
  • Upgrade sinon dev dependency from 9.0.2 to 14.0.0
  • Upgrade textlint dev dependency from 11.7.6 to 12.2.1
  • Upgrade textlint-rule-terminology dev dependency from 2.1.4 to 3.0.2
  • Upgrade textlint-rule-write-good dev dependency from 1.6.2 to 2.0.0

2.21.0

29 Apr 07:29
5ca70e1
Compare
Choose a tag to compare

Changes (since 2.20.0):

  • Add: new JEXL transformations for handle upper and low case: touppercase, tolowercase
  • Add: do not process attr expressions when current attr update is of type 'commandStatus' or 'commandResult'
  • Add: add expressions, payloadType and contentType to commands models
  • Fix: exclude all attrs when explicitAttrs is an empty array (#1235)
  • Fix: bad query searching for group using resource instead of type by executeUpdateSideEffects (commands) (#1216)
  • Fix: search device and group for a command using entity type when provided to proper match (#1211)
  • Upgrade mongodb dep from 3.6.8 to 3.6.12
  • Upgrade mongoose dep from 5.7.7 to 5.7.14
  • Upgrade moment dep from 2.24.0 to 2.29.2 due to security vulnerability (CVE-2022-24785)
  • Upgrade async dep from 2.6.2 to 2.6.4 due to security vulnerability (CWE-1321)

2.20.0

03 Mar 10:20
d8a7f7f
Compare
Choose a tag to compare

Changes (since 2.19.0):

  • Fix: clean service and subservice domain fields when clean domain so logs now show correct serv= and subserv= (#1201)
  • Remove: obsolete NGSIv1-based commandLine utility (along with command-shell-lib and mu2 dependencies)
  • Remove: long time unused agentConsole utility

2.19.0

07 Feb 09:33
9d368e5
Compare
Choose a tag to compare

Changes (since 2.18.0):

  • Add: extend explicitAttrs to allow JEXL expression for conditional propagation of measures (#1179)
  • Add: new JEXL transformations for adding and removing elements to/from Array: addset, removeset
  • Add: allow to use static attributes into JEXL expressions (#1184)
  • Add: add underscore to legacy expression parser (#1191)
  • Add: support for adding and updating device handler (iota-json#602)
  • Add: support both WARN and WARNING log levels (#1146)
  • Add: allow update polling device field (iota-json#602)
  • Fix: fill serv/subserv properly in context log of plugins (#1189)
  • Fix: change severity from WARN to INFO when invalid context in contextAvailable of legacy expression plugin occcurs
  • Fix: try get group by type using current type if no type is provided (#1155)
  • Fix: JEXL NGSI-LD null processing extended to remove invalid calculated values (#1164)
  • Fix: Remove preprocess stripping of explicitAttrs (#1151)
  • Fix: NGSI-LD commands are invalid (#1185)
  • Fix: replace request obsolete library by got (#858)
  • Upgrade logops dep from 2.1.0 to 2.1.2 due to colors dependency corruption

2.18.0

12 Nov 09:36
6d14fd3
Compare
Choose a tag to compare

Changes (since 2.17.0):

  • Add: new JEXL get TimeZone Offset (valid for summer winter schedulles) and binary shifting for bitwise operator
  • Add: new JEXL transformation for Array.slice(init, end) in order to simplify binary-frame-string field extraction
  • Fix: IOTA sends illegal entity type or entity id to CB (#1124)
  • Fix: include attribute metadata in attribute device info for API requests (#1115)
  • Fix: set status code response from CB for EntityGenericError is raised (#1109)
  • FIx: export fillDomains function to iotagent-node-lib available functions (needed to fix logs in iotagent-json#587 and iotagent-ul#508)
  • Fix: keep internalAttributes stored in device mongo collection when update it (#1092)
  • Fix: accept the entry internal_attributes in a PUT /iot/devices/:deviceId (#1083)
  • Fix: amend null processing for NGSI-LD (#1118)
  • Fix: support of same entity_id and diferent entity_type in multientity plugin (#1127)
  • Fix: align the NGSI-v2 provisioning keywords Text and TextUnrestricted to map directly to NGSI-LD Property (#1131)
  • Fix: JEXL undefined, null and falsy values support (#1132)
  • Updated JEXL dependecy from 2.1.1 to 2.3.0 to allow the usage of NGSI operators ($inc, etc.)
  • Remove: NGSI-v1 implementation (#966)

2.17.0

30 Aug 07:28
c4f2e8f
Compare
Choose a tag to compare

Changes (since 2.16.0):

  • Add: new JEXL transformation for JSON parse/stringify (#1087)
  • Add: support for externalised JEXL transformations, at libraty level and inyected via API (#1056)
  • Fix: try to search for a device group service in base of not only by apikey but also type (#1076)
  • Fix: rename provided jexl function sumaarray to addreduce (#1073)

2.16.0

18 Jun 08:00
f01a7b7
Compare
Choose a tag to compare

This release removes support from Nodev10. Note that Nodev10 was deprecated in May 2021 according to the node release schedule. You are highly encouraged to use Nodev12 or newer.

Changes (since 2.15.0)

  • Add: more functions to JEXL transformations (#1052)
  • Add: db uri and options in mongo connection log INFO trace
  • Fix: prevent to update an entity with an empty payload
  • Fix: use getDeviceSilently in checkDuplicates to avoid raise a false mongo alarm.
  • Fix: expose getConfigurationSilently to enable retrieve a configuration without raise a false mongo alarm (#1007)
  • Fix: add getTypeSilently for device group and use in device registration to avoid false mongo alarm
  • Fix: check isNaN value in JEXL extractContext to avoid misbehaviours (#1066)
  • Fix: simplify contextAvailable for JEXL perser allowing null and undefined substitutions (#1053)
  • Fix: do not transform attribute value using attribute type after apply expression plugin JEXL (#1036)
  • Fix: use explicitAttrs defined in group is not defined at device level (#1045, #1016)
  • Fix: autoprovision feature, removing the relationship with appendMode (#1003)
  • Fix: autoprovision functionality not working as expected when configured at device/group level in NGSIv1 API (#1003)
  • Fix: appendMode not working in NGSIv2
  • Fix: apply NGSIv2 timestamp properly to array of entities
  • Fix: check expression context before apply it in entity_name (#1040)
  • Fix: check entityId is valid after apply expression in multientity plugin (#1039)
  • Fix: check access to data in fillService facility
  • Fix: use expressionLanguage defined in group is not defined at device level (#1027)
  • Fix: ensure service of groups, device and commands is stored in mongo in lowercase (#1023)
  • Fix: group command is not provisioned in device when entity_type is different (#1011)
  • Fix: avoid automatic conversion from geo:xxxx ('xxxx' diferent from 'json') to geo:json (reverts the work done in PR #854) (*)
  • Fix: update MongoDB accesses to use lean() for faster retrieval
  • Fix: PUT /iot/devices/:deviceId operation to implement proper update of entity_name and entity_type (#770)
  • Fix: Include @context on NGSI-LD subscription (#1019)
  • Upgrade underscore dep from 1.9.1 to 1.12.1 due to security vulnerability
  • Upgrade mongodb dep from 3.2.3 to 3.6.8
  • Upgrade mongoose dep from 5.7.5 to 5.7.7
  • Set Nodejs 12 as minimum version in packages.json (effectively removing Nodev10 from supported versions)

(*) Also included in 2.15.1

2.15.1

06 Apr 14:21
3eccf36
Compare
Choose a tag to compare

Changes (since 2.15.0):

  • Hotfix: avoid automatic conversion from geo:xxxx ('xxxx' diferent from 'json') to geo:json (reverts the work done in PR #854)

2.15.0

18 Feb 09:47
70dd0c2
Compare
Choose a tag to compare

This is the last version of the library supporting Nodev10. Note that Nodev10 will be deprecated in May 2021, according to the node release schedule. You are highly encouraged to use Nodev12 or newer.

Changes (since 2.14.0):

  • Add: return apikey in GET device if device was provisioned with explicit apikey (#977)
  • Add: allow update device apikey using Update (put) API (#978)
  • Add: defaultEntityNameConjunction config (env var IOTA_DEFAULT_ENTITY_NAME_CONJUNCTION) and configuration group API field for default entity_name conjunction (#944)
  • Add: prettier code formatting
  • Add: husky and lint-staged
  • Add: basic NGSI-LD support as experimental feature (#842)
    • Active measures
    • GeoJSON and DateTime, unitCode and observedAt NGSI-LD support
      • The NGSI v2 TimeInstant element has been mapped onto the NGSI-LD observedAt property
      • The NGSI v2 metadata.unitCode attribute has been mapped onto the NGSI-LD unitCode property
    • Multi-measures
    • Lazy Attributes
    • Commands
    • Mixed mode (based in ngsiVersion field in the provisioning API)
    • Support to linked data entities to enable the traversal of the nodes of the knowledge graph
  • Fix: ensure use proper expression parser in multientity plugin (#989)
  • Fix: ensure registrationId is updated when device with commands is updated
  • Fix: use null instead of ' ' as default attribute value in entity provisioned (#938)
  • Fix: Add support for lazy and internal_attributes in service notifications to Manager (#768)
  • Fix: combine multi-entity and expressions with duplicate attribute name, by enabling expression over object_id (which are not duplicated in a attribute mapping contrary to name) (#941)
  • Fix: bug in legacy and JEXL expression that was not converting "0" to 0
  • Fix: support for mapping different attributes to the same entity_name
  • Fix: Ensure GeoJSON is correctly encoded in NGSI-v2 requests (#961)
  • Update codebase to use ES6
    • Remove JSHint and jshint overrides
    • Add esLint using standard tamia presets
    • Replace var with let/const
    • Fix or disable eslint errors