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

@protobuf-ts/protoc

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protobuf-ts/protoc

Installs the protocol buffer compiler "protoc" for you.

  • 2.9.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @protobuf-ts/protoc?

@protobuf-ts/protoc is a TypeScript library that provides tools for working with Protocol Buffers (protobuf). It allows you to generate TypeScript code from .proto files, making it easier to work with protobuf in TypeScript projects.

What are @protobuf-ts/protoc's main functionalities?

Generate TypeScript Code from .proto Files

This feature allows you to generate TypeScript code from .proto files. The generated code can then be used in your TypeScript projects to work with protobuf messages.

const { protoc } = require('@protobuf-ts/protoc');

protoc({
  protoFiles: ['path/to/your/file.proto'],
  outDir: 'path/to/output/directory'
}).then(() => {
  console.log('TypeScript code generated successfully');
}).catch(err => {
  console.error('Error generating TypeScript code:', err);
});

Compile Protobuf Definitions

This feature allows you to compile protobuf definitions from .proto files. The compiled definitions can be used to serialize and deserialize protobuf messages.

const { compile } = require('@protobuf-ts/protoc');

compile({
  protoFiles: ['path/to/your/file.proto'],
  outDir: 'path/to/output/directory'
}).then(() => {
  console.log('Protobuf definitions compiled successfully');
}).catch(err => {
  console.error('Error compiling protobuf definitions:', err);
});

Other packages similar to @protobuf-ts/protoc

Keywords

FAQs

Package last updated on 13 Mar 2024

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