# resolve-protobuf-schema

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

Latest version **2.1.0** (published 2018-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install resolve-protobuf-schema
pnpm add resolve-protobuf-schema
yarn add resolve-protobuf-schema
bun add resolve-protobuf-schema
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2018-07-20 |
| First published | 2014-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/resolve-protobuf-schema) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/resolve-protobuf-schema
- Repository: https://github.com/mafintosh/resolve-protobuf-schema
- Issues: https://github.com/mafintosh/resolve-protobuf-schema/issues
- npm.io page: https://npm.io/package/resolve-protobuf-schema

## Dependencies (1)

- [protocol-buffers-schema](https://npm.io/package/protocol-buffers-schema.md) ^3.3.1

## Recent versions

- 2.1.0 (latest) — 2018-07-20
- 2.0.0 — 2015-07-02
- 1.0.2 — 2014-10-12
- 1.0.1 — 2014-10-12
- 1.0.0 — 2014-10-12

## README

# 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

---
_Source: https://npm.io/package/resolve-protobuf-schema · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
