resolve-protobuf-schema

WebJar for resolve-protobuf-schema

License

License

MIT
Categories

Categories

Protobuf Data Data Structures
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

resolve-protobuf-schema
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

resolve-protobuf-schema
WebJar for resolve-protobuf-schema
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mafintosh/resolve-protobuf-schema

Download resolve-protobuf-schema

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/resolve-protobuf-schema/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>resolve-protobuf-schema</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/resolve-protobuf-schema/
implementation 'org.webjars.npm:resolve-protobuf-schema:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/resolve-protobuf-schema/
implementation ("org.webjars.npm:resolve-protobuf-schema:2.1.0")
'org.webjars.npm:resolve-protobuf-schema:jar:2.1.0'
<dependency org="org.webjars.npm" name="resolve-protobuf-schema" rev="2.1.0">
  <artifact name="resolve-protobuf-schema" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='resolve-protobuf-schema', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "resolve-protobuf-schema" % "2.1.0"
[org.webjars.npm/resolve-protobuf-schema "2.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : protocol-buffers-schema jar [3.3.1,4)

Project Modules

There are no modules declared in this project.

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

Versions

Version
2.1.0
2.0.0
1.0.2