Releases: aluisiora/routeros-client
Menu querying
It is now possible to query for items to execute actions, such as:
client.menu("/ip address")
.where("address", "192.168.88.15/24")
.orWhere("address", "192.168.15.88/24")
.remove();
It also works with update()
, unset()
, moveAbove()
, unset()
, disable()
and enable()
functions.
client.menu("/ip address")
.where("address", "192.168.88.15/24")
.orWhere("address", "192.168.15.88/24")
.update({ comment: "Admin Network" });
Note: moveAbove()
is exclusive to this feature, to use internal ids or numbers, use the move()
method.
Item returning
BREAKING CHANGE
When adding, updating or removing, the referenced items will be returned from the promise.
- When adding, the item added will be returned.
- When updating, disabling or enabling items, the updated info will be returned.
- When removing, the items removed will be returned.
- When moving items, the items moved will be returned.
Localization removal
Breaking Change
Localization got removed as of version 0.8.0, this is due to the bloat of responsibility on a single library. If you are using the english messages, nothing will change. From now on, all errors and messages thrown will be in english. In order to translate to other languages, you can do it inside your app where you are consuming this lib, you can find all errno
messages here: https://github.com/aluisiora/node-routeros/blob/master/src/messages.ts
Id query search
It is now possible to use parameters like "id", "numbers" and "placeBefore" without specifying the internal ".id", instead, you can use an object in the "id" parameter so it can be resolved to the internal id. You can now do:
addressMenu.remove({
address: "192.168.88.15/24"
});
Data printing and sream fixes
- Solved a bug when there was no data and tag from the socket to process, an UNREGISTEREDTAG error was thrown, this was actually a bug on
node-routeros
lib. query()
andfilter()
does not add question marks anymore, even when using "print".
Breaking change for Typescript
Wrong semversioning, this should've been 0.5.0. But anyway, there is a breaking change when using Typescript:
- Stream class was renamed RStream to prevent overlapping the existing node Stream.