Comments (24)
There's an open PR, I might fork the project and sort this out tonight
timostamm/protobuf-ts#233
from js.
I'm contemplating switching to https://pbkit.dev/ a much more maintainable project, Although I prefer the code generated by protobuf-ts, the project is in shambles and not moving to ESM
from js.
Yeah that's correct, so it's not a massive issue, it's just nice to have it work out of the box for devs
from js.
Update on api:
Current:
Protobuf.AdminMessage.toBinary({
payloadVariant: {
confirmSetRadio: true,
oneofKind: "confirmSetRadio"
}
});
New:
AdminMessage.encodeBinary({
payloadVariant: {
field: 'confirmSetRadio',
value: true
}
});
from js.
Not yet, I'll push some wip changes tonight
from js.
@ajmcquilkin @gtnoble please check latest release 0.6.113
it should contain a fix for node,
from js.
Yeah, need to dig a little deeper into the reasons behind requiring Talib, not sure right now
from js.
Update to this, I've done away with protobuf-ts
, now using bufbuild/protobuf-es
which supports multiple runtimes.
Just sorting out a few last minute bits
from js.
I'm not an expert on this, but it looks like the generated files are not adding the .js extension to the relative imports.
from js.
running node with the option --experimental-specifier-resolution=node seems to be a quick fix for this issue. I suppose in the long run it would be best for the protobuf-ts code generator be modified to generate the proper extensions.
from js.
Yeah, as you've observed, this is the undesirable behavior exhibited by protobuf-ts, I've opened an issue about it before but the developer did not want to invest time into the feature, he was open to PR's though.
from js.
How does the web client get around this issue when consuming this package? I'm trying to import the JS library in Electron and I'm getting the same error. To my knowledge I'm not able to perform the --experimental-specifier-resolution=node
fix.
from js.
Sounds good! Happy to help with this if at all possible, this issue is a current blocker for me
from js.
Interesting, I'll take a look at that. What kind of refactoring would this require?
from js.
Also looks like this uses Deno. Would there be the possibility for issues running this on Node-based projects?
Edit: the maintainers claim it runs in Node.js or browser here
from js.
Yeah, so the pbkit project is made for deno but:
They distribute it for node: https://www.npmjs.com/package/pbkit
I would like to make this package Deno native in the future with support for node.
from js.
Issue that I'm talking with the devs about right now is distributing the pb
binary, as we currently use protoc
that is handled by https://www.npmjs.com/package/node-protoc
however I'm not sure of the best way forwards, without making each user manually install this on there system.
from js.
Interesting, is there no package for the pb
binary? Alternatively, is there a situation in which the pb
binary is only used in development and doesn't need to be distributed through the package?
from js.
There will be a few things that are different, string union's instead of enums, imports will be seperated by message not file anymore and a few more
from js.
Gotcha, so there will have to be some internal rewrites in that case. Would this require API changes and/or a breaking version change?
from js.
The meshtastic.js version will likely be breaking for apps, but the api will be very similar. as for interacting with devices, no change there.
from js.
Sounds good! Happy to help out with the refactor if this ends up being the best way to move forward
from js.
Is there a public branch for the potential changes?
from js.
Seems to be working for me! Just ran tests in a CRA and a Node.js app and both seem to be working. On a side note, is tslib
a required package of this library? If so, is there a reason it isn't included as a dependency? I've had multiple repos error when it isn't installed
from js.
Related Issues (19)
- SUPER COOL! HOT 4
- Implement Web Serial functions HOT 3
- Make connection failure behaviour more robust HOT 1
- Consider WebSockets HOT 8
- GATT operation not authorized HOT 5
- Switch to RxJS HOT 4
- Support Meshtastic HTTP API methods
- Support portnum architecture
- Accommodate all members of LogLevelEnum in utils > debugLog
- Incorrectly set enums in protobuf messages HOT 4
- Investigate using ToRadio.PeerInfo over want_config_id
- Investigate using DATA_PAYLOAD_LEN instead of 512 for whole packet
- Add Type definitions or convert project to TypeScript HOT 35
- Bluetooth writeToRadio not working - writeQueue never empties
- Build Broken due to changes to to mesh.proto, mesh.options HOT 1
- Changing INodeSerialConnection baud rate HOT 3
- Install issue HOT 2
- Payload data does not get decoded properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js.