Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bufbuild/protoplugin

Package Overview
Dependencies
Maintainers
6
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufbuild/protoplugin

Helps to create your own Protocol Buffers code generators.

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
195K
decreased by-0.88%
Maintainers
6
Weekly downloads
 
Created

What is @bufbuild/protoplugin?

@bufbuild/protoplugin is a package designed to facilitate the creation of plugins for the Buf build system, which is used for working with Protocol Buffers (protobufs). It provides tools and utilities to help developers generate code and manage protobuf schemas more efficiently.

What are @bufbuild/protoplugin's main functionalities?

Code Generation

This feature allows you to generate code from protobuf files. You can specify the input protobuf file and the output directory where the generated code should be placed.

const { CodeGenerator } = require('@bufbuild/protoplugin');

const generator = new CodeGenerator();
generator.generate({
  protoFile: 'path/to/your.proto',
  outputDir: 'path/to/output',
  options: { /* generation options */ }
});

Schema Management

This feature helps in managing protobuf schemas. You can load a schema from a file and retrieve it for further processing or validation.

const { SchemaManager } = require('@bufbuild/protoplugin');

const manager = new SchemaManager();
manager.loadSchema('path/to/schema.proto');
const schema = manager.getSchema();
console.log(schema);

Plugin Development

This feature allows you to develop custom plugins for the Buf build system. You can extend the Plugin class and implement your own code generation logic.

const { Plugin } = require('@bufbuild/protoplugin');

class MyCustomPlugin extends Plugin {
  constructor() {
    super();
  }

  generateCode(request) {
    // Custom code generation logic
  }
}

const plugin = new MyCustomPlugin();
plugin.run();

Other packages similar to @bufbuild/protoplugin

FAQs

Package last updated on 05 Dec 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