Closed tom3012 closed 5 years ago
Since JSON can be imported directly you should do so. Then it also will be added when bundled.
import event_schema from './event_schema.json';
import function_schema from './function_schema.json';
Thanks for reporting! Added a new release 1.0.7 to support this.
See: https://github.com/research-virtualfortknox/msb-client-websocket-nodejs/releases/tag/v1.0.7
I'm submitting a ...
Current behavior:
If you want to extend the MsbClient class in an own class, the working directory of the files
function_schema.json
andevent_schema.json
will be changed and the files will no longer be accessible. Look at the example:Expected behavior:
Would be nice to have the option, to extend the class with own code for better code structure.
Steps to reproduce:
MsbClient
MSB client version: 1.0.6
MSB server version: x.y.z-RELEASE
Anything else:
I did not create a PR because I'm not sure if there is a deeper meaning to the usage of
fs.readFileSync
. One possible solution: