Socket
Socket
Sign inDemoInstall

resolve-protobuf-schema

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-protobuf-schema

Read a protobuf schema from the disk, parse it and resolve all imports


Version published
Maintainers
1
Weekly downloads
1,029,428
decreased by-26.1%

Weekly downloads

Readme

Source

resolve-protobuf-schema

Read a protobuf schema from the disk, parse it and resolve all imports

npm install resolve-protobuf-schema

build status

Usage

Store the following example protobuf schema in test.proto

message Test {
  optional string test = 1;
}

Then run

var resolve = require('resolve-protobuf-schema')
console.log(resolve.sync('test.proto')) // prints the parsed schema

Schema imports will resolved as well

import "./test.proto"

message AnotherTest {
  optional string test = 1;
}
console.log(resolve.sync('./another-test.proto')) // will print a combined parsed schema

API

  • resolve(path, cb) read and resolve a schema
  • resolve.sync(path) sync version of resolve

License

MIT

FAQs

Last updated on 20 Jul 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc