remobe generated ts and load proto file directly

This commit is contained in:
Sinuhe Tellez
2021-08-14 23:24:17 -04:00
parent e708e1d0c7
commit 531af31490
7 changed files with 232 additions and 2417 deletions

View File

@@ -0,0 +1,10 @@
const protobuf = require('protobufjs')
const sparkplugBProto = require('../../../res/sparkplug_b.proto')
export let Payload = undefined
export function loadSparkplugBPayload() {
protobuf.load(sparkplugBProto).then((root: any) => {
Payload = root.lookupType('com.cirruslink.sparkplug.protobuf.Payload')
})
}