All of the Google API's protocol buffer files


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
482Jun 11, 2021Jan 18, 2016Minified + gzip package size for @naturalcycles/google-proto-files in KB


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

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

Load a proto which depends on google common protos.


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


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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.