1.3.0 • Published 1 year ago

protoc-binary v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

protoc-binary

Downloads Google Protocol Buffers binary wrapped as npm package.
By default, it will download the latest released version.
If an older version is required, add "protoc-binary": "x.x.x" at the root of your package.json.

Install

npm i -D protoc-binary

To force re-check for latest protoc binary releases, simply run npm ci.
Alternatively, you can manually invoke the install script node -e "require('protoc-binary/install')".
If working in both Windows and WSL, you can invoke the install script to download binaries for both, however when switching OS you should run npm ci.

Usage

Node.jsrequire("protoc-binary").protoc(["--version"])
npxnpx protoc --version
Linux/Powershellnode_modules/.bin/protoc --version
Windows cmdnode_modules\\.bin\\protoc --version

API

protoc

/* Function wrapper for protoc binary */
require("protoc-binary").protoc(
    args,    /* {string[]} protoc arguments */
    protoDir /* {string} [optional] absolute path to dir containing .proto files */
);

binary

/* Returns the absolute path to local protoc binary */
require("protoc-binary").binary;

version

/* Returns version of local protoc binary */
require("protoc-binary").version;

Supported versions

See official protoc binaries download page.

  • osx-aarch_64.zip
  • osx-x86_64.zip
  • linux-x86_32.zip
  • linux-x86_64.zip
  • linux-arm64.zip
  • win32.zip
  • win64.zip
1.2.0

1 year ago

1.3.0

1 year ago

1.1.2

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

3.19.1

2 years ago