MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //home/cafsindia/snap.cafsinfotech.in/node_modules/resolve-protobuf-schema/README.md
# resolve-protobuf-schema

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

```
npm install resolve-protobuf-schema
```

[![build status](http://img.shields.io/travis/mafintosh/resolve-protobuf-schema.svg?style=flat)](http://travis-ci.org/mafintosh/resolve-protobuf-schema)

## Usage

Store the following example protobuf schema in `test.proto`

```
message Test {
  optional string test = 1;
}
```

Then run

``` js
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;
}
```

``` js
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