eclipse-thingweb / td-tools

Tooling for Thing Descriptions and Thing Models
https://thingweb.io
Other
3 stars 3 forks source link

New package for td-utils #18

Open egekorkan opened 2 months ago

egekorkan commented 2 months ago

We will create a package in td-tools that has such helper functions and then deprecate the functions here. Also, the function in https://github.com/eclipse-thingweb/playground/blob/master/packages/core/index.js#L1293 will be moved there and published. It can be more flexible with some filters like "find it only in properties".

td-utils will be the new package name and can contain such tools. It should return an object with binding name as keys (just http, opc etc) then inside it found uri scheme (http, https, mqtt+ws) and subprotocol.

Originally posted by @egekorkan in https://github.com/eclipse-thingweb/node-wot/issues/1270#issuecomment-2079025156

egekorkan commented 2 months ago

These should be small functions to extract information out of TDs. Anything that is not transforming or validating TDs.

Also just as an example, the function that finds the form for an operation can go here but it is a core function of node-wot so it will not be moved anytime soon.

hasanheroglu commented 2 weeks ago

I will take care of this.

egekorkan commented 2 weeks ago

After discussing with @hasanheroglu , we should also find the hostname since it will be relevant when connecting to the broker in MQTT (like in https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-mqtt/src/mqtt-client.ts#L55). The port would be also relevant