@naturalcycles/google-proto-files

0.13.3 • Public • Published

google-proto-files Build Status

Get a copy of the googleapis proto files into your project

$ npm install --save google-proto-files
var protoFiles = require('google-proto-files')

Get a directory path by executing as a function

protoFiles('logging', 'v2')
// node_modules/google-proto-files/google/logging/v2

Get a path to the entry proto file for a specific API version

protoFiles.pubsub.v1
// node_modules/google-proto-files/google/pubsub/v1/pubsub.proto

Load a proto which depends on google common protos.

Asynchronously

protoFiles.load('path/to/file.proto').then(function(root) {
  var MyService = root.lookup('example.MyService')
})

Synchronously

var root = protoFiles.loadSync('path/to/file.proto');
var MyService = root.lookup('example.MyService');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.13.3
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.13.3
    17
  • 0.13.2
    0
  • 0.13.1
    0

Package Sidebar

Install

npm i @naturalcycles/google-proto-files

Weekly Downloads

17

Version

0.13.3

License

MIT

Last publish

Collaborators

  • kirillgroshkov
  • kribor