New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codenotary/immudb-node-pbjs

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codenotary/immudb-node-pbjs

immudb schema.proto protobuf node bindings.

  • 2.0.0-alpha.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-55.56%
Maintainers
4
Weekly downloads
 
Created
Source

Generate protobufjs client for immudb .proto file

Prepare schema.proto after updates

It may be neccessery to repair synthax errors in actualized .proto file.

Following lines should be commented:

  • import "google/api/annotations.proto";
  • import "protoc-gen-swagger/options/annotations.proto";

Also:

  • ; semicolon after title: "immudb REST API"; should be removed
  • ; semicolon after info: { ... }; should be removed

Generate static code

To generate static protobuf code in file src/main.js:

npx pbjs --target static-module --force-long --es6 --wrap es6 --out src/main.js schema.proto

To use as a module and generate typedefinitions change second line on src/main.js to:

import $protobuf from "protobufjs/minimal.js";

Generate typescript definitions

To generate typescript type definitions in file src/main.d.ts:

npx pbts --out src/main.d.ts src/main.js

Alternatively (sometimes this works):

npx pbjs --target static-module --force-long --es6 --wrap es6 schema.proto | npx pbts -o src/main.d.ts -

Keywords

FAQs

Package last updated on 04 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc